Selaa lähdekoodia

ipfs repo base

Bob Mottram 8 vuotta sitten
vanhempi
commit
403e69cb84
No account linked to committer's email
1 muutettua tiedostoa jossa 17 lisäystä ja 9 poistoa
  1. 17
    9
      src/freedombone-app-ipfs

+ 17
- 9
src/freedombone-app-ipfs Näytä tiedosto

30
 
30
 
31
 VARIANTS='mesh'
31
 VARIANTS='mesh'
32
 
32
 
33
-IPFS_GO_REPO="https://github.com/ipfs/go-ipfs"
33
+IPFS_GO_REPO_BASE="github.com/ipfs/go-ipfs"
34
+IPFS_GO_REPO="https://${IPFS_GO_REPO_BASE}"
34
 IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
35
 IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
35
 IPFS_PORT=4001
36
 IPFS_PORT=4001
36
 IPFS_NODE_VERSION='6.2.2'
37
 IPFS_NODE_VERSION='6.2.2'
415
 fi
416
 fi
416
 chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
417
 chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
417
 
418
 
418
-IPFS_GO_REPO2=$(echo "$IPFS_GO_REPO" | sed 's|https://||g')
419
-go get -u ${IPFS_GO_REPO2}/cmd/ipfs
419
+echo "go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs"
420
+go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
420
 if [ ! "$?" = "0" ]; then
421
 if [ ! "$?" = "0" ]; then
421
     exit 8242
422
     exit 8242
422
 fi
423
 fi
423
 
424
 
424
-if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
425
+if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
425
     echo $'go get failed to get ipfs'
426
     echo $'go get failed to get ipfs'
426
     exit 63923
427
     exit 63923
427
 fi
428
 fi
428
 
429
 
429
-cd \$GOPATH/src/$IPFS_GO_REPO2
430
+cd \$GOPATH/src/$IPFS_GO_REPO_BASE
430
 git checkout $IPFS_COMMIT -b $IPFS_COMMIT
431
 git checkout $IPFS_COMMIT -b $IPFS_COMMIT
432
+if [ ! "$?" = "0" ]; then
433
+    exit 735639
434
+fi
435
+
431
 exit 0
436
 exit 0
432
 EOF
437
 EOF
433
     chroot ${rootdir} chmod +x /root/install_ipfs_go.sh
438
     chroot ${rootdir} chmod +x /root/install_ipfs_go.sh
512
     fi
517
     fi
513
     chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
518
     chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
514
 
519
 
515
-    IPFS_GO_REPO2=$(echo "$IPFS_GO_REPO" | sed 's|https://||g')
516
-    go get -u ${IPFS_GO_REPO2}/cmd/ipfs
520
+    go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
517
     if [ ! "$?" = "0" ]; then
521
     if [ ! "$?" = "0" ]; then
518
         exit 8242
522
         exit 8242
519
     fi
523
     fi
520
 
524
 
521
-    if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
525
+    if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
522
         echo $'go get failed to get ipfs'
526
         echo $'go get failed to get ipfs'
523
         exit 63923
527
         exit 63923
524
     fi
528
     fi
525
 
529
 
526
-    cd $GOPATH/src/$IPFS_GO_REPO2
530
+    cd $GOPATH/src/$IPFS_GO_REPO_BASE
527
     git checkout $IPFS_COMMIT -b $IPFS_COMMIT
531
     git checkout $IPFS_COMMIT -b $IPFS_COMMIT
532
+    if [ ! "$?" = "0" ]; then
533
+        exit 735639
534
+    fi
535
+
528
     if ! grep -q "ipfs commit" $COMPLETION_FILE; then
536
     if ! grep -q "ipfs commit" $COMPLETION_FILE; then
529
         echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE
537
         echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE
530
     else
538
     else