fixed unbound variable error

This commit is contained in:
Michael Rodler 2016-06-02 12:11:47 +02:00
parent 37e74bef92
commit ea9b95a996

View file

@ -72,8 +72,8 @@ function base_build_setup_arch()
{ {
PACKAGE_REQS="curl wget python2 python3 git subversion unzip python-virtualenvwrapper" PACKAGE_REQS="curl wget python2 python3 git subversion unzip python-virtualenvwrapper"
if [ "$ALLOW_SUDO" -eq 1 ]; then if [ "$ALLOW_SUDO" -eq 1 ]; then
sudo pacman -Syu --noconfirm $PACKAGE_REQS sudo pacman -Syu --noconfirm --needed $PACKAGE_REQS
sudo pacman -Syu --noconfirm base-devel || true sudo pacman -Syu --noconfirm --needed base-devel || true
else else
TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS" TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS"
fi fi
@ -108,7 +108,7 @@ function base_build_setup()
{ {
case "$1" in case "$1" in
"ubuntu") "ubuntu")
;& # fallthrough ;& # fallthrough
"debian") "debian")
base_build_setup_debian base_build_setup_debian
;; ;;
@ -121,6 +121,10 @@ function base_build_setup()
} }
if [[ $# -eq 0 ]]; then
usage
exit 1
fi
DISTRI=$(detect_distribution) DISTRI=$(detect_distribution)
@ -140,8 +144,14 @@ done
[ -z "$ALLOW_SUDO" ] && export ALLOW_SUDO=0 [ -z "$ALLOW_SUDO" ] && export ALLOW_SUDO=0
ACTION=$1 if [[ $# -ge 1 ]]; then
TOOL=$2 ACTION="$1"
fi
if [[ $# -eq 2 ]]; then
TOOL="$2"
else
TOOL=""
fi
if [ "$TOOL" == "all" ] if [ "$TOOL" == "all" ]
then then