Obtain tox variables from the main install file
This commit is contained in:
parent
cf16df0e13
commit
d9af8529d2
|
@ -55,10 +55,11 @@ FN=
|
|||
CHROOT_PREFIX=''
|
||||
FRIENDS_MIRRORS_SERVER=
|
||||
|
||||
TOXID_REPO="https://github.com/bashrc/toxid"
|
||||
TOX_PORT=33445
|
||||
TOX_REPO="git://github.com/irungentoo/toxcore.git"
|
||||
TOX_COMMIT='73b2144edcfd1ca617e9054479b66ab0c0361a14'
|
||||
# To avoid confusions these are obtained from the main project file
|
||||
TOXID_REPO=
|
||||
TOX_PORT=
|
||||
TOX_REPO=
|
||||
TOX_COMMIT=
|
||||
# These are some default nodes, but you can replace them with trusted nodes
|
||||
# as you prefer. See https://wiki.tox.im/Nodes
|
||||
TOX_NODES=
|
||||
|
@ -418,6 +419,59 @@ function mesh_firewall {
|
|||
}
|
||||
|
||||
function mesh_tox_node {
|
||||
# obtain commits from the main file
|
||||
if [ -f /usr/loca/bin/freedombone ]; then
|
||||
TOX_COMMIT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
else
|
||||
TOX_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
fi
|
||||
if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
|
||||
TOX_COMMIT=$TOX_COMMIT_MAIN
|
||||
fi
|
||||
if [ ! $TOX_COMMIT ]; then
|
||||
echo $'No Tox commit was specified'
|
||||
exit 76325
|
||||
fi
|
||||
|
||||
if [ -f /usr/loca/bin/freedombone ]; then
|
||||
TOXID_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
else
|
||||
TOXID_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
fi
|
||||
if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
|
||||
TOXID_REPO=$TOXID_REPO_MAIN
|
||||
fi
|
||||
if [ ! $TOXID_REPO ]; then
|
||||
echo $'No ToxID repo was specified'
|
||||
exit 78252
|
||||
fi
|
||||
|
||||
if [ -f /usr/loca/bin/freedombone ]; then
|
||||
TOX_PORT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
else
|
||||
TOX_PORT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
fi
|
||||
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
|
||||
TOX_PORT=$TOX_PORT_MAIN
|
||||
fi
|
||||
if [ ! $TOX_PORT ]; then
|
||||
echo $'No Tox port was specified'
|
||||
exit 32856
|
||||
fi
|
||||
|
||||
if [ -f /usr/loca/bin/freedombone ]; then
|
||||
TOX_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
else
|
||||
TOX_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
fi
|
||||
if [ ${#TOX_REPO_MAIN} -gt 10 ]; then
|
||||
TOX_REPO=$TOX_REPO_MAIN
|
||||
fi
|
||||
if [ ! $TOX_REPO ]; then
|
||||
echo $'No Tox repo was specified'
|
||||
exit 16865
|
||||
fi
|
||||
|
||||
$CHROOT_PREFIX apt-get -y install build-essential libtool autotools-dev
|
||||
$CHROOT_PREFIX apt-get -y install automake checkinstall check git yasm
|
||||
$CHROOT_PREFIX apt-get -y install libsodium13 libsodium-dev libcap2-bin
|
||||
|
@ -507,6 +561,16 @@ function mesh_tox_node {
|
|||
}
|
||||
|
||||
function mesh_tox_client {
|
||||
# obtain commits from the main file
|
||||
if [ -f /usr/loca/bin/freedombone ]; then
|
||||
TOXIC_COMMIT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
else
|
||||
TOXIC_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
||||
fi
|
||||
if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
|
||||
TOXIC_COMMIT=$TOXIC_COMMIT_MAIN
|
||||
fi
|
||||
|
||||
$CHROOT_PREFIX apt-get -y install libncursesw5-dev libconfig-dev libqrencode-dev
|
||||
$CHROOT_PREFIX apt-get -y install libcurl4-openssl-dev libvpx-dev libopenal-dev
|
||||
|
||||
|
|
Loading…
Reference in New Issue