ipfs repo base

This commit is contained in:
Bob Mottram 2016-08-15 08:42:10 +01:00
parent cb3266d82f
commit 403e69cb84
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 17 additions and 9 deletions

View File

@ -30,7 +30,8 @@
VARIANTS='mesh' VARIANTS='mesh'
IPFS_GO_REPO="https://github.com/ipfs/go-ipfs" IPFS_GO_REPO_BASE="github.com/ipfs/go-ipfs"
IPFS_GO_REPO="https://${IPFS_GO_REPO_BASE}"
IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166' IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
IPFS_PORT=4001 IPFS_PORT=4001
IPFS_NODE_VERSION='6.2.2' IPFS_NODE_VERSION='6.2.2'
@ -415,19 +416,23 @@ if grep -q 'GOPATH/bin' ~/.bashrc; then
fi fi
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
IPFS_GO_REPO2=$(echo "$IPFS_GO_REPO" | sed 's|https://||g') echo "go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs"
go get -u ${IPFS_GO_REPO2}/cmd/ipfs go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
exit 8242 exit 8242
fi fi
if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
echo $'go get failed to get ipfs' echo $'go get failed to get ipfs'
exit 63923 exit 63923
fi fi
cd \$GOPATH/src/$IPFS_GO_REPO2 cd \$GOPATH/src/$IPFS_GO_REPO_BASE
git checkout $IPFS_COMMIT -b $IPFS_COMMIT git checkout $IPFS_COMMIT -b $IPFS_COMMIT
if [ ! "$?" = "0" ]; then
exit 735639
fi
exit 0 exit 0
EOF EOF
chroot ${rootdir} chmod +x /root/install_ipfs_go.sh chroot ${rootdir} chmod +x /root/install_ipfs_go.sh
@ -512,19 +517,22 @@ function install_ipfs_go {
fi fi
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
IPFS_GO_REPO2=$(echo "$IPFS_GO_REPO" | sed 's|https://||g') go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
go get -u ${IPFS_GO_REPO2}/cmd/ipfs
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
exit 8242 exit 8242
fi fi
if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then if [ ! -d $GOPATH/src/$IPFS_GO_REPO_BASE ]; then
echo $'go get failed to get ipfs' echo $'go get failed to get ipfs'
exit 63923 exit 63923
fi fi
cd $GOPATH/src/$IPFS_GO_REPO2 cd $GOPATH/src/$IPFS_GO_REPO_BASE
git checkout $IPFS_COMMIT -b $IPFS_COMMIT git checkout $IPFS_COMMIT -b $IPFS_COMMIT
if [ ! "$?" = "0" ]; then
exit 735639
fi
if ! grep -q "ipfs commit" $COMPLETION_FILE; then if ! grep -q "ipfs commit" $COMPLETION_FILE; then
echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE
else else