1
0
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:
Tux3 / Mlkj / !Lev.uXFMLA 2014-07-15 11:43:47 +02:00
commit d8e994e8f8

View File

@ -2,8 +2,7 @@
################ parameters ################
# directory where the script is located
SCRIPT_NAME=$(readlink -f $0)
SCRIPT_DIR=`dirname $SCRIPT_NAME`
SCRIPT_DIR=$( cd $(dirname $0); pwd -P)
# directory where dependencies will be installed
INSTALL_DIR=libs
@ -21,6 +20,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,14 +71,14 @@ 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
# thus we should remove the cloned repositories
# if exists, otherwise cloning them may fail
rm -rf ${BASE_DIR}/${SODIUM_DIR}
rm -rf ${SBASE_DIR}/${TOX_CORE}
rm -rf ${BASE_DIR}/${TOX_CORE_DIR}