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'
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_PORT=4001
IPFS_NODE_VERSION='6.2.2'
@ -415,19 +416,23 @@ if grep -q 'GOPATH/bin' ~/.bashrc; then
fi
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_REPO2}/cmd/ipfs
echo "go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs"
go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
if [ ! "$?" = "0" ]; then
exit 8242
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'
exit 63923
fi
cd \$GOPATH/src/$IPFS_GO_REPO2
cd \$GOPATH/src/$IPFS_GO_REPO_BASE
git checkout $IPFS_COMMIT -b $IPFS_COMMIT
if [ ! "$?" = "0" ]; then
exit 735639
fi
exit 0
EOF
chroot ${rootdir} chmod +x /root/install_ipfs_go.sh
@ -512,19 +517,22 @@ function install_ipfs_go {
fi
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_REPO2}/cmd/ipfs
go get -u ${IPFS_GO_REPO_BASE}/cmd/ipfs
if [ ! "$?" = "0" ]; then
exit 8242
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'
exit 63923
fi
cd $GOPATH/src/$IPFS_GO_REPO2
cd $GOPATH/src/$IPFS_GO_REPO_BASE
git checkout $IPFS_COMMIT -b $IPFS_COMMIT
if [ ! "$?" = "0" ]; then
exit 735639
fi
if ! grep -q "ipfs commit" $COMPLETION_FILE; then
echo "ipfs commit:$IPFS_COMMIT" >> $COMPLETION_FILE
else