File tree 5 files changed +11
-7
lines changed
5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/ bin/env sh
2
2
3
3
git add " $( ./sha256-update.sh) "
4
4
Original file line number Diff line number Diff line change 1
- #! / bin/sh
1
+ #! /usr/ bin/env sh
2
2
3
3
out=update-golang.sh.sha256
4
4
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
3
3
shellcheck -e SC2153,SC2016 pre-commit sha256-update.sh update-golang.sh
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
#
3
3
# update-golang is a script to easily fetch and install new Golang releases
4
4
#
5
5
# Home: https://github.com/udhos/update-golang
6
6
#
7
7
# PIPETHIS_AUTHOR udhos
8
8
9
+ # ignore runtime environment variables
10
+ # shellcheck disable=SC2153
9
11
version=0.20
10
12
11
13
set -o pipefail
@@ -272,19 +274,21 @@ profile_path_add() {
272
274
profile_path_remove
273
275
274
276
msg profile_path_add: issuing new " $abs_gobin " to " $abs_profiled "
275
- local dont_edit=" ;# DOT NOT EDIT: installed by $path_mark "
277
+ local dont_edit=" ;# DO NOT EDIT: installed by $path_mark "
276
278
echo " export PATH=\$ PATH:$abs_gobin $dont_edit " >> " $abs_profiled "
277
279
278
280
local user_gobin=
279
281
[ -n " $GOPATH " ] && user_gobin=$( echo " $GOPATH " | awk -F: ' {print $1}' ) /bin
280
- [ -z " $user_gobin " ] && user_gobin=' $HOME/go/bin'
282
+ # shellcheck disable=SC2016
283
+ [ -z " $user_gobin " ] && user_gobin=' $HOME/go/bin' ; # we want $HOME literal
281
284
msg profile_path_add: issuing " $user_gobin " to " $abs_profiled "
282
285
echo " export PATH=\$ PATH:$user_gobin $dont_edit " >> " $abs_profiled "
283
286
284
287
if [ " $abs_goroot " != $default_goroot ]; then
285
288
msg profile_path_add: setting up custom GOROOT=" $abs_goroot " to " $abs_profiled "
286
289
echo " export GOROOT=$abs_goroot $dont_edit " >> " $abs_profiled "
287
290
fi
291
+ chmod 755 " $abs_profiled "
288
292
}
289
293
290
294
running_as_root () {
Original file line number Diff line number Diff line change 1
- 2d890dfe07eab0700d14ccc282c1dd2ec737095e907b4cad3c71d1ec423d0e31 update-golang.sh
1
+ 6beb10c818f6dfc52d03803672b526acfabcb9b3fab231996e62366b95c0dd64 update-golang.sh
You can’t perform that action at this time.
0 commit comments