mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-13 14:32:34 +00:00
fixed unbound variable error
This commit is contained in:
parent
37e74bef92
commit
ea9b95a996
1 changed files with 15 additions and 5 deletions
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue