projects
/
webi-installers
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8000aa7
)
update default GOBIN path as well
author
AJ ONeal
<coolaj86@gmail.com>
Sat, 13 Jun 2020 19:50:59 +0000
(13:50 -0600)
committer
AJ ONeal
<coolaj86@gmail.com>
Sat, 13 Jun 2020 19:50:59 +0000
(13:50 -0600)
golang/install.bash
patch
|
blob
|
history
diff --git
a/golang/install.bash
b/golang/install.bash
index a6a8592ca6d76febbd7c59d5fd44268d99b9cc1f..2ded9df92b523403be0bbfec92d2885f7d95f760 100644
(file)
--- a/
golang/install.bash
+++ b/
golang/install.bash
@@
-10,7
+10,6
@@
# mkdir -p hello/
# pushd hello/
# ```
# mkdir -p hello/
# pushd hello/
# ```
-# <br/>
#
# ```bash
# cat << EOF >> main.go
#
# ```bash
# cat << EOF >> main.go
@@
-25,7
+24,6
@@
# }
# EOF
# ```
# }
# EOF
# ```
-# <br/>
#
# ```bash
# go fmt ./...
#
# ```bash
# go fmt ./...
@@
-41,17
+39,21
@@
set -u
# Install go #
###################
# Install go #
###################
+new_go="${HOME}/.local/opt/go-v${WEBI_VERSION}/bin/go"
common_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
new_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
common_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
new_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
-new_go="${HOME}/.local/opt/go-v${WEBI_VERSION}/bin/go"
+common_go_bin="${HOME}/go"
+new_go_bin="${HOME}/.local/opt/go-bin-v${WEBI_VERSION}"
update_go_home() {
rm -rf "$common_go_home"
ln -s "$new_go_home" "$common_go_home"
update_go_home() {
rm -rf "$common_go_home"
ln -s "$new_go_home" "$common_go_home"
-
# TODO get better output from pathman / output the path to add as return to webi bootstrap
webi_path_add "$common_go_home/bin"
# TODO get better output from pathman / output the path to add as return to webi bootstrap
webi_path_add "$common_go_home/bin"
- webi_path_add "$HOME/go/bin"
+
+ rm -rf "$common_go_bin"
+ ln -s "$new_go_bin" "$common_go_bin"
+ webi_path_add "$common_go_bin/bin"
}
if [ -x "$new_go_home/bin/go" ]; then
}
if [ -x "$new_go_home/bin/go" ]; then