Skip to content
Snippets Groups Projects
Unverified Commit cb3266d8 authored by Bob Mottram's avatar Bob Mottram
Browse files

Check that directory exists

parent 5ec40daa
No related branches found
No related tags found
No related merge requests found
......@@ -408,18 +408,10 @@ fi
IPFS_PATH=\$GOPATH/bin
export PATH="\$GOPATH/bin:\$PATH:"
if ! grep -q 'GOPATH/bin' ~/.bashrc; then
echo 'export PATH="\$GOPATH/bin:\$PATH:";' >> ~/.bashrc
else
sed -i "s|systemctl set-environment GOPATH=.*|systemctl set-environment GOPATH=\$GOPATH|g" ~/.bashrc
fi
echo 'export PATH="\$GOPATH/bin:\$PATH:";' >> /home/$MY_USERNAME/.bashrc
# set gopath for the user
if ! grep -q "GOPATH=" /home/$MY_USERNAME/.bashrc; then
echo "export GOPATH=$GOPATH" >> /home/$MY_USERNAME/.bashrc
echo 'export PATH="\$GOPATH/bin:\$PATH:";' >> /home/$MY_USERNAME/.bashrc
else
sed -i "s|export GOPATH=.*|export GOPATH=\$GOPATH|g" /home/$MY_USERNAME/.bashrc
if grep -q 'GOPATH/bin' ~/.bashrc; then
sed -i "s|systemctl set-environment GOPATH=.*|systemctl set-environment GOPATH=\$GOPATH|g" ~/.bashrc
fi
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.bashrc
......@@ -429,6 +421,11 @@ if [ ! "$?" = "0" ]; then
exit 8242
fi
if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
echo $'go get failed to get ipfs'
exit 63923
fi
cd \$GOPATH/src/$IPFS_GO_REPO2
git checkout $IPFS_COMMIT -b $IPFS_COMMIT
exit 0
......@@ -521,6 +518,11 @@ function install_ipfs_go {
exit 8242
fi
if [ ! -d $GOPATH/src/$IPFS_GO_REPO2 ]; then
echo $'go get failed to get ipfs'
exit 63923
fi
cd $GOPATH/src/$IPFS_GO_REPO2
git checkout $IPFS_COMMIT -b $IPFS_COMMIT
if ! grep -q "ipfs commit" $COMPLETION_FILE; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment