More generic

This commit is contained in:
Bob Mottram 2016-04-12 09:40:47 +01:00
parent d9af8529d2
commit e8702fed67
1 changed files with 99 additions and 99 deletions

View File

@ -420,10 +420,10 @@ function mesh_firewall {
function mesh_tox_node { function mesh_tox_node {
# obtain commits from the main file # obtain commits from the main file
if [ -f /usr/loca/bin/freedombone ]; then if [ -f /usr/loca/bin/${PROJECT_NAME} ]; then
TOX_COMMIT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOX_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOX_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOX_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
TOX_COMMIT=$TOX_COMMIT_MAIN TOX_COMMIT=$TOX_COMMIT_MAIN
@ -433,10 +433,10 @@ function mesh_tox_node {
exit 76325 exit 76325
fi fi
if [ -f /usr/loca/bin/freedombone ]; then if [ -f /usr/loca/bin/${PROJECT_NAME} ]; then
TOXID_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}') TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOXID_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}') TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
TOXID_REPO=$TOXID_REPO_MAIN TOXID_REPO=$TOXID_REPO_MAIN
@ -446,10 +446,10 @@ function mesh_tox_node {
exit 78252 exit 78252
fi fi
if [ -f /usr/loca/bin/freedombone ]; then if [ -f /usr/loca/bin/${PROJECT_NAME} ]; then
TOX_PORT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}') TOX_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOX_PORT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}') TOX_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
TOX_PORT=$TOX_PORT_MAIN TOX_PORT=$TOX_PORT_MAIN
@ -459,10 +459,10 @@ function mesh_tox_node {
exit 32856 exit 32856
fi fi
if [ -f /usr/loca/bin/freedombone ]; then if [ -f /usr/loca/bin/${PROJECT_NAME} ]; then
TOX_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}') TOX_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOX_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}') TOX_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOX_REPO_MAIN} -gt 10 ]; then if [ ${#TOX_REPO_MAIN} -gt 10 ]; then
TOX_REPO=$TOX_REPO_MAIN TOX_REPO=$TOX_REPO_MAIN