From e87b10b95676f43b097096597699be2dcfe7efab Mon Sep 17 00:00:00 2001 From: Yan Date: Mon, 18 May 2015 01:39:32 -0700 Subject: [PATCH] move packages into a variable --- bin/manage-tools | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/manage-tools b/bin/manage-tools index dfa91d4..2f80474 100755 --- a/bin/manage-tools +++ b/bin/manage-tools @@ -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