Skip to content

Commit

Permalink
Move sudo check in build-vyos
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Jul 9, 2017
1 parent b7fd721 commit be083de
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build-vyos
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ then
exit -1
fi

echo "Checking if sudo is installed..."
dpkg -s sudo >/dev/null 2>1
if [ $? -eq 1 ];
then
echo "Installing sudo"
su -c "apt-get update; apt-get install -y sudo"
fi

echo "Checking if squeeze archive repository is a configured apt source..."
if [ `cat /etc/apt/sources.list | grep "http://archive.debian.org/debian/ squeeze" | wc -l` -ne 1 ];
then
Expand All @@ -27,14 +35,6 @@ then
cd $PWD
fi

echo "Checking if sudo is installed..."
dpkg -s sudo >/dev/null 2>1
if [ $? -eq 1 ];
then
echo "Installing sudo"
su -c "apt-get update; apt-get install -y sudo"
fi

echo "Checking if build-essential is installed..."
dpkg -s build-essential >/dev/null 2>1
if [ $? -eq 1 ];
Expand Down

0 comments on commit be083de

Please sign in to comment.