From 3cf8c4a6e8869f2433cf793b07f6c5c2519088a7 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 29 Jan 2016 12:01:01 -0500 Subject: [PATCH] Add gobin to path in an attempt to make it easy to find go binaries --- misc/make-gopath.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/misc/make-gopath.sh b/misc/make-gopath.sh index ea6ad5e2..4bebfd65 100755 --- a/misc/make-gopath.sh +++ b/misc/make-gopath.sh @@ -23,3 +23,14 @@ if ! env | grep -q '^GOBIN='; then fi 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"