Browse Source

Check that tox client gets installed

Bob Mottram 9 years ago
parent
commit
37ec4cebf8
1 changed files with 12 additions and 6 deletions
  1. 12
    6
      src/freedombone-mesh-install

+ 12
- 6
src/freedombone-mesh-install View File

@@ -568,7 +568,7 @@ function mesh_tox_client {
568 568
     else
569 569
         TOXIC_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')      
570 570
     fi
571
-    if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
571
+    if [ ${#TOXIC_COMMIT_MAIN} -gt 10 ]; then
572 572
         TOXIC_COMMIT=$TOXIC_COMMIT_MAIN
573 573
     fi  
574 574
 
@@ -578,13 +578,19 @@ function mesh_tox_client {
578 578
     $CHROOT_PREFIX git_clone $TOXIC_REPO $INSTALL_DIR/toxic
579 579
     $CHROOT_PREFIX cd $INSTALL_DIR/toxic
580 580
     $CHROOT_PREFIX git checkout $TOXIC_COMMIT -b $TOXIC_COMMIT
581
-    echo "Toxic commit:$TOXIC_COMMIT" >> $rootdir$COMPLETION_FILE
582
-
581
+    if ! grep -q "Toxic commit" $rootdir$COMPLETION_FILE; then
582
+        echo "Toxic commit:$TOXIC_COMMIT" >> $rootdir$COMPLETION_FILE
583
+    fi
584
+    
583 585
     $CHROOT_PREFIX make
584 586
     if [ ! -f $INSTALL_DIR/toxic/build/toxic ]; then
585 587
         exit 74872
586 588
     fi
587 589
     $CHROOT_PREFIX make install
590
+    if [ ! -f /usr/local/bin/toxic ]; then
591
+        echo $'Tox client was not installed'
592
+        exit 63278
593
+    fi  
588 594
 }
589 595
 
590 596
 function mesh_zeronet {
@@ -708,9 +714,9 @@ function mesh_batman_client {
708 714
         if [ ! -f /usr/bin/toxic ]; then
709 715
             $CHROOT_PREFIX sudo apt-get -y install toxic
710 716
             echo "n
711
-                        /nick $USER
712
-                        /exit
713
-                        " | ${rootdir}/usr/bin/toxic -d
717
+       /nick $USER
718
+       /exit
719
+       " | ${rootdir}/usr/bin/toxic -d
714 720
         fi
715 721
     fi
716 722