Skip to content
Snippets Groups Projects
Commit d9af8529 authored by Bob Mottram's avatar Bob Mottram
Browse files

Obtain tox variables from the main install file

parent cf16df0e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment