Skip to content

Commit 5f4a4e5

Browse files
author
udhos
committed
darwin does not support /etc/profile.d
1 parent c07bda6 commit 5f4a4e5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

update-golang.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,18 @@ fi
105105
[ -n "$DESTINATION" ] && destination=$DESTINATION
106106
[ -n "$OS" ] && os=$OS
107107
[ -n "$ARCH" ] && arch=$ARCH
108-
[ -n "$PROFILED" ] && profiled=$PROFILED
109108
cache=$destination
110109
[ -n "$CACHE" ] && cache=$CACHE
111110

111+
case "$os" in
112+
darwin)
113+
# darwin does not support /etc/profile.d, change default to /etc/profile
114+
profiled=/etc/profile
115+
;;
116+
esac
117+
118+
[ -n "$PROFILED" ] && profiled=$PROFILED
119+
112120
show_vars() {
113121
echo user: "$(id)"
114122

update-golang.sh.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a758e8816a001897ab6f761c7eda99af8226569e47777d5c6e14042902e64904 update-golang.sh
1+
77baf9921d5061391548ea0df442caf3527bdfe681793a3e1b0207fee476ff33 update-golang.sh

0 commit comments

Comments
 (0)