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:
8c1fd8b
)
add pkg_format_cmd_version
author
AJ ONeal
<coolaj86@gmail.com>
Sun, 14 Jun 2020 08:25:09 +0000
(
02:25
-0600)
committer
AJ ONeal
<coolaj86@gmail.com>
Sun, 14 Jun 2020 08:25:09 +0000
(
02:25
-0600)
golang/install.bash
patch
|
blob
|
history
diff --git
a/golang/install.bash
b/golang/install.bash
index 6d84d4e5a70b97cb1bf9351c940d22af4f148b88..af3c34e5e2f447c1be64ae7425d1fb4ddcd32ade 100644
(file)
--- a/
golang/install.bash
+++ b/
golang/install.bash
@@
-56,6
+56,12
@@
pkg_get_current_version() {
echo "$(go version | cut -d' ' -f3 | sed 's:go::')"
}
+pkg_format_cmd_version() {
+ # 'go v1.14.0' will be 'go1.14'
+ my_version=$(echo "$1" | sed 's:\.0::g')
+ echo "${pkg_cmd_name}${my_version}"
+}
+
pkg_link_new_version() {
# 'pkg_common_opt' will default to $HOME/.local/opt/go
# 'pkg_new_opt' will be the installed version, such as to $HOME/.local/opt/go-v1.14.2