ソースを参照

ipfs repo base

Bob Mottram 8 年 前
コミット
403e69cb84
コミット者のEメールアドレスに関連付けられたアカウントが存在しません
共有1 個のファイルを変更した17 個の追加9 個の削除を含む
  1. 17
    9
      src/freedombone-app-ipfs

+ 17
- 9
src/freedombone-app-ipfs ファイルの表示

@@ -30,7 +30,8 @@
30 30
 
31 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 35
 IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
35 36
 IPFS_PORT=4001
36 37
 IPFS_NODE_VERSION='6.2.2'
@@ -415,19 +416,23 @@ if grep -q 'GOPATH/bin' ~/.bashrc; then
415 416
 fi
416 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 421
 if [ ! "$?" = "0" ]; then
421 422
     exit 8242
422 423
 fi
423 424
 
424
-if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
425
+if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
425 426
     echo $'go get failed to get ipfs'
426 427
     exit 63923
427 428
 fi
428 429
 
429
-cd \$GOPATH/src/$IPFS_GO_REPO2
430
+cd \$GOPATH/src/$IPFS_GO_REPO_BASE
430 431
 git checkout $IPFS_COMMIT -b $IPFS_COMMIT
432
+if [ ! "$?" = "0" ]; then
433
+    exit 735639
434
+fi
435
+
431 436
 exit 0
432 437
 EOF
433 438
     chroot ${rootdir} chmod +x /root/install_ipfs_go.sh
@@ -512,19 +517,22 @@ function install_ipfs_go {
512 517
     fi
513 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 521
     if [ ! "$?" = "0" ]; then
518 522
         exit 8242
519 523
     fi
520 524
 
521
-    if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
525
+    if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
522 526
         echo $'go get failed to get ipfs'
523 527
         exit 63923
524 528
     fi
525 529
 
526
-    cd $GOPATH/src/$IPFS_GO_REPO2
530
+    cd $GOPATH/src/$IPFS_GO_REPO_BASE
527 531
     git checkout $IPFS_COMMIT -b $IPFS_COMMIT
532
+    if [ ! "$?" = "0" ]; then
533
+        exit 735639
534
+    fi
535
+
528 536
     if ! grep -q "ipfs commit" $COMPLETION_FILE; then
529 537
         echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE
530 538
     else