This commit is contained in:
2022-09-05 12:37:12 +03:00
parent 8b7329a8c6
commit c5c0ead6f6
4 changed files with 21 additions and 17 deletions
+7 -6
View File
@@ -3,7 +3,8 @@
action="install"
go_version="1.18.1"
. <(wget -qO- https://raw.githubusercontent.com/letsnode/Utils/main/bashbuilder/colors.sh) --
#. <(wget -qO- https://raw.githubusercontent.com/letsnode/Utils/main/bashbuilder/colors.sh) --
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/colors.sh) --
function option_value() {
echo "$1" | sed -e 's%^--[^=]*=%%g; s%^-[^=]*=%%g';
@@ -22,7 +23,7 @@ function install() {
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go${go_version}.linux-amd64.tar.gz"
rm "go${go_version}.linux-amd64.tar.gz"
. <(wget -qO- https://raw.githubusercontent.com/letsnode/Utils/main/bashbuilder/addvar.sh) -n "PATH" -v "$PATH:/usr/local/go/bin:$HOME/go/bin"
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/addvar.sh) -n "PATH" -v "$PATH:/usr/local/go/bin:$HOME/go/bin"
fi
}
@@ -35,7 +36,7 @@ function uninstall() {
while test $# -gt 0; do
case "$1" in
-h|--help)
. <(wget -qO- https://raw.githubusercontent.com/letsnode/Utils/main/bashbuilder/logo.sh)
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/logo.sh)
echo
echo -e "${C_LGn}Functionality${RES}: the script installs or uninstalls GO"
echo
@@ -49,9 +50,9 @@ while test $# -gt 0; do
echo -e "You can use either \"=\" or \" \" as an option and value ${C_LGn}delimiter${RES}"
echo
echo -e "${C_LGn}Useful URLs${RES}:"
echo -e "https://raw.githubusercontent.com/letsnode/Utils/main/installers/golang.sh - script URL"
echo -e "https://t.me/letskynode — node Community"
echo -e "https://teletype.in/@letskynode — guides and articles"
echo -e "http://astrader.net:3006/sem/Utils/raw/branch/main/Installers/golang.sh - script URL"
# echo -e "https://t.me/letskynode — node Community"
# echo -e "https://teletype.in/@letskynode — guides and articles"
echo
return 0 2>/dev/null; exit 0
;;