mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): fix toxcore checkout in the bootstrap script
Renamed `TOX_CORE_DIR` → `TOXCORE_DIR` for consistency. Made read-only vars immutable. Fix #4014.
This commit is contained in:
parent
b4c4569299
commit
1d98a97e3b
22
bootstrap.sh
22
bootstrap.sh
|
@ -29,17 +29,20 @@ fi
|
||||||
|
|
||||||
################ parameters ################
|
################ parameters ################
|
||||||
# directory where the script is located
|
# directory where the script is located
|
||||||
SCRIPT_DIR=$( cd $(dirname $0); pwd -P)
|
readonly SCRIPT_DIR=$( cd $(dirname $0); pwd -P)
|
||||||
|
|
||||||
# directory where dependencies will be installed
|
# directory where dependencies will be installed
|
||||||
INSTALL_DIR=libs
|
readonly INSTALL_DIR=libs
|
||||||
|
|
||||||
# just for convenience
|
# just for convenience
|
||||||
BASE_DIR="${SCRIPT_DIR}/${INSTALL_DIR}"
|
readonly BASE_DIR="${SCRIPT_DIR}/${INSTALL_DIR}"
|
||||||
|
|
||||||
|
# toxcore version to checkout
|
||||||
|
readonly TOXCORE_VERSION="v0.1.2"
|
||||||
|
|
||||||
# directory names of cloned repositories
|
# directory names of cloned repositories
|
||||||
TOX_CORE_DIR=libtoxcore-latest
|
readonly TOXCORE_DIR="libtoxcore-$TOXCORE_VERSION"
|
||||||
SQLCIPHER_DIR=sqlcipher-stable
|
readonly SQLCIPHER_DIR="sqlcipher-stable"
|
||||||
|
|
||||||
# default values for user given parameters
|
# default values for user given parameters
|
||||||
INSTALL_TOX=true
|
INSTALL_TOX=true
|
||||||
|
@ -115,7 +118,7 @@ mkdir -p "${BASE_DIR}"
|
||||||
|
|
||||||
# remove not needed dirs
|
# remove not needed dirs
|
||||||
remove_build_dirs() {
|
remove_build_dirs() {
|
||||||
rm -rf "${BASE_DIR}/${TOX_CORE_DIR}"
|
rm -rf "${BASE_DIR}/${TOXCORE_DIR}"
|
||||||
rm -rf "${BASE_DIR}/${SQLCIPHER_DIR}"
|
rm -rf "${BASE_DIR}/${SQLCIPHER_DIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,10 +133,11 @@ remove_build_dirs
|
||||||
#install libtoxcore
|
#install libtoxcore
|
||||||
if [[ $INSTALL_TOX = "true" ]]; then
|
if [[ $INSTALL_TOX = "true" ]]; then
|
||||||
git clone https://github.com/toktok/c-toxcore.git \
|
git clone https://github.com/toktok/c-toxcore.git \
|
||||||
"${BASE_DIR}/${TOX_CORE_DIR}" --depth 1
|
--branch $TOXCORE_VERSION \
|
||||||
|
--depth 1 \
|
||||||
|
"${BASE_DIR}/${TOXCORE_DIR}"
|
||||||
|
|
||||||
pushd ${BASE_DIR}/${TOX_CORE_DIR}
|
pushd ${BASE_DIR}/${TOXCORE_DIR}
|
||||||
git checkout tags/v0.1.0
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
|
|
Loading…
Reference in New Issue
Block a user