aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkshrc3
-rw-r--r--shell/utils3
2 files changed, 4 insertions, 2 deletions
diff --git a/mkshrc b/mkshrc
index cc97e80..f5927fc 100644
--- a/mkshrc
+++ b/mkshrc
@@ -96,7 +96,8 @@ set_go() {
export GOPATH="${GOPATH:-$HOME/go}"
export PATH="$GOPATH/bin:$PATH"
- _gobin="/usr/local/go/bin"
+ GOROOT="${GOROOT:-/usr/local/go}"
+ _gobin="${GOROOT}/bin"
if [ -e "$_gobin" ] ; then
export PATH="$_gobin:$PATH"
fi
diff --git a/shell/utils b/shell/utils
index 3fceec8..3822ca2 100644
--- a/shell/utils
+++ b/shell/utils
@@ -3,7 +3,8 @@ set_go() {
export GOPATH="${GOPATH:-$HOME/go}"
export PATH="$GOPATH/bin:$PATH"
- _gobin="/usr/local/go/bin"
+ GOROOT="${GOROOT:-/usr/local/go}"
+ _gobin="${GOROOT}/bin"
if [ -e "$_gobin" ] ; then
export PATH="$_gobin:$PATH"
fi