diff --git a/src/freedombone-mesh-install b/src/freedombone-mesh-install index 67a04517..ab15ae13 100755 --- a/src/freedombone-mesh-install +++ b/src/freedombone-mesh-install @@ -568,7 +568,7 @@ function mesh_tox_client { 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 + if [ ${#TOXIC_COMMIT_MAIN} -gt 10 ]; then TOXIC_COMMIT=$TOXIC_COMMIT_MAIN fi @@ -578,13 +578,19 @@ function mesh_tox_client { $CHROOT_PREFIX git_clone $TOXIC_REPO $INSTALL_DIR/toxic $CHROOT_PREFIX cd $INSTALL_DIR/toxic $CHROOT_PREFIX git checkout $TOXIC_COMMIT -b $TOXIC_COMMIT - echo "Toxic commit:$TOXIC_COMMIT" >> $rootdir$COMPLETION_FILE - + if ! grep -q "Toxic commit" $rootdir$COMPLETION_FILE; then + echo "Toxic commit:$TOXIC_COMMIT" >> $rootdir$COMPLETION_FILE + fi + $CHROOT_PREFIX make if [ ! -f $INSTALL_DIR/toxic/build/toxic ]; then exit 74872 fi $CHROOT_PREFIX make install + if [ ! -f /usr/local/bin/toxic ]; then + echo $'Tox client was not installed' + exit 63278 + fi } function mesh_zeronet { @@ -708,9 +714,9 @@ function mesh_batman_client { if [ ! -f /usr/bin/toxic ]; then $CHROOT_PREFIX sudo apt-get -y install toxic echo "n - /nick $USER - /exit - " | ${rootdir}/usr/bin/toxic -d + /nick $USER + /exit + " | ${rootdir}/usr/bin/toxic -d fi fi