Add gobin to path in an attempt to make it easy to find go binaries

This commit is contained in:
James Shubin
2016-01-29 12:01:01 -05:00
parent 9e08de0bcf
commit 3cf8c4a6e8

View File

@@ -23,3 +23,14 @@ if ! env | grep -q '^GOBIN='; then
fi fi
echo "gobin is: $GOBIN" echo "gobin is: $GOBIN"
# add gobin to $PATH
if ! env | grep '^PATH=' | grep -q "$GOBIN"; then
if ! grep -q '^export PATH="'"${GOBIN}:${PATH}"'"' ~/.bashrc; then
echo 'export PATH="'"${GOBIN}"':'"${PATH}"'"' >> ~/.bashrc
fi
export PATH="${PATH}" # basically useless
echo "setting path to: $PATH"
fi
echo "path is: $PATH"