mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #143 from retuxx/docu
fixed bootstrap script for Mac OS X
This commit is contained in:
commit
d8e994e8f8
25
bootstrap.sh
25
bootstrap.sh
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
################ parameters ################
|
################ parameters ################
|
||||||
# directory where the script is located
|
# directory where the script is located
|
||||||
SCRIPT_NAME=$(readlink -f $0)
|
SCRIPT_DIR=$( cd $(dirname $0); pwd -P)
|
||||||
SCRIPT_DIR=`dirname $SCRIPT_NAME`
|
|
||||||
|
|
||||||
# directory where dependencies will be installed
|
# directory where dependencies will be installed
|
||||||
INSTALL_DIR=libs
|
INSTALL_DIR=libs
|
||||||
|
@ -21,6 +20,24 @@ TOX_CORE_DIR=libtoxcore-latest
|
||||||
# if this script gets the parameter -t or --tox
|
# if this script gets the parameter -t or --tox
|
||||||
TOX_ONLY=false
|
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 ##########
|
########## check input parameters ##########
|
||||||
|
@ -54,14 +71,14 @@ fi
|
||||||
|
|
||||||
|
|
||||||
############### prepare step ###############
|
############### prepare step ###############
|
||||||
# create INSTALL_DIR directory if necessary
|
# create BASE_DIR directory if necessary
|
||||||
mkdir -p ${BASE_DIR}
|
mkdir -p ${BASE_DIR}
|
||||||
|
|
||||||
# maybe an earlier run of this script failed
|
# maybe an earlier run of this script failed
|
||||||
# thus we should remove the cloned repositories
|
# thus we should remove the cloned repositories
|
||||||
# if exists, otherwise cloning them may fail
|
# if exists, otherwise cloning them may fail
|
||||||
rm -rf ${BASE_DIR}/${SODIUM_DIR}
|
rm -rf ${BASE_DIR}/${SODIUM_DIR}
|
||||||
rm -rf ${SBASE_DIR}/${TOX_CORE}
|
rm -rf ${BASE_DIR}/${TOX_CORE_DIR}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user