summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/login.d/10_golang.sh8
-rw-r--r--.config/login.d/10_goroot.sh3
2 files changed, 8 insertions, 3 deletions
diff --git a/.config/login.d/10_golang.sh b/.config/login.d/10_golang.sh
new file mode 100644
index 0000000..c3ae013
--- /dev/null
+++ b/.config/login.d/10_golang.sh
@@ -0,0 +1,8 @@
+if [[ -z $GOROOT ]]; then
+ export GOROOT="/homes/shumakl/.prefix.$(uname -m)/go"
+ if [[ -d $GOROOT ]]; then
+ PATH="$PATH:$GOROOT/bin"
+ else
+ unset GOROOT
+ fi
+fi
diff --git a/.config/login.d/10_goroot.sh b/.config/login.d/10_goroot.sh
deleted file mode 100644
index 89d1037..0000000
--- a/.config/login.d/10_goroot.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [[ -z $GOROOT ]]; then
- export GOROOT=/homes/shumakl/.prefix.$(uname -m)/go
-fi