move packages into a variable

This commit is contained in:
Yan 2015-05-18 01:39:32 -07:00
parent 6a0f4781a9
commit e87b10b956

View file

@ -58,13 +58,15 @@ cd $(dirname "${BASH_SOURCE[0]}")/..
case $ACTION in
setup)
if [ $(dpkg -l build-essential libtool g++ gcc texinfo curl wget | grep "^ii" | wc -l) -ne 7 ]
PACKAGE_REQS="build-essential libtool g++ gcc texinfo curl wget automake autoconf"
PACKAGE_COUNT=9
if [ $(dpkg -l $PACKAGE_REQS | grep "^ii" | wc -l) -ne $PACKAGE_COUNT ]
then
if [ "$ALLOW_SUDO" -eq 1 ]
then
sudo apt-get install build-essential libtool g++ gcc texinfo curl wget
sudo apt-get -y install $PACKAGE_REQS
else
echo "Please install the following packages: build-essential libtool g++ gcc texinfo curl wget"
echo "Please install the following packages: $PACKAGE_REQS"
fi
fi