mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
check if variables are empty to be more failsafe
This commit is contained in:
parent
047d1fdd50
commit
a37fef136b
20
bootstrap.sh
20
bootstrap.sh
|
@ -21,6 +21,24 @@ TOX_CORE_DIR=libtoxcore-latest
|
|||
# if this script gets the parameter -t or --tox
|
||||
TOX_ONLY=false
|
||||
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "BASE_DIR should not be empty... aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$SODIUM_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "SODIUM_DIR should not be empty... aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$TOX_CORE_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "TOX_CORE_DIR should not be empty... aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
########## check input parameters ##########
|
||||
|
@ -54,7 +72,7 @@ fi
|
|||
|
||||
|
||||
############### prepare step ###############
|
||||
# create INSTALL_DIR directory if necessary
|
||||
# create BASE_DIR directory if necessary
|
||||
mkdir -p ${BASE_DIR}
|
||||
|
||||
# maybe an earlier run of this script failed
|
||||
|
|
Loading…
Reference in New Issue
Block a user