File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,16 @@ release_list=https://golang.org/dl/
31
31
source=https://storage.googleapis.com/golang
32
32
destination=/usr/local
33
33
release=1.11.3 ; # just the default. the script detects the latest available release.
34
- profiled=/etc/profile.d/golang_path.sh
35
34
arch_probe=" uname -m"
36
35
37
36
os=$( uname -s | tr " [:upper:]" " [:lower:]" )
38
37
38
+ if [ -d /etc/profile.d ]; then
39
+ profiled=/etc/profile.d/golang_path.sh
40
+ else
41
+ profiled=/etc/profile
42
+ fi
43
+
39
44
[ -n " $ARCH_PROBE " ] && arch_probe=" $ARCH_PROBE "
40
45
41
46
arch=$( $arch_probe )
107
112
[ -n " $ARCH " ] && arch=$ARCH
108
113
cache=$destination
109
114
[ -n " $CACHE " ] && cache=$CACHE
110
-
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
115
[ -n " $PROFILED " ] && profiled=$PROFILED
119
116
120
117
show_vars () {
Original file line number Diff line number Diff line change 1
- 544deb84b6d068470af08f06f41b262c405d8404f9f5db8e126e42ccdbc59825 update-golang.sh
1
+ b93ac25f21d7bb7e7756b7344382802da8801cb4b2cfc26fc32dc2f295b01296 update-golang.sh
You can’t perform that action at this time.
0 commit comments