mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] filtron & morty - install golang binary that fits to arch & os
Closes: https://github.com/searxng/searxng/issues/507 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
35
utils/lib.sh
35
utils/lib.sh
@@ -504,7 +504,6 @@ install_template() {
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
service_is_available() {
|
||||
|
||||
# usage: service_is_available <URL>
|
||||
@@ -825,40 +824,6 @@ EOF
|
||||
build_msg GH-PAGES "deployed"
|
||||
}
|
||||
|
||||
# golang
|
||||
# ------
|
||||
|
||||
go_is_available() {
|
||||
|
||||
# usage: go_is_available $SERVICE_USER && echo "go is installed!"
|
||||
|
||||
sudo -i -u "${1}" which go &>/dev/null
|
||||
}
|
||||
|
||||
install_go() {
|
||||
|
||||
# usage: install_go "${GO_PKG_URL}" "${GO_TAR}" "${SERVICE_USER}"
|
||||
|
||||
local _svcpr=" ${_Yellow}|${3}|${_creset} "
|
||||
|
||||
rst_title "Install Go in user's HOME" section
|
||||
|
||||
rst_para "download and install go binary .."
|
||||
cache_download "${1}" "${2}"
|
||||
|
||||
tee_stderr 0.1 <<EOF | sudo -i -u "${3}" | prefix_stdout "$_svcpr"
|
||||
echo \$PATH
|
||||
echo \$GOPATH
|
||||
mkdir -p \$HOME/local
|
||||
rm -rf \$HOME/local/go
|
||||
tar -C \$HOME/local -xzf ${CACHE}/${2}
|
||||
EOF
|
||||
sudo -i -u "${3}" <<EOF | prefix_stdout
|
||||
! which go >/dev/null && echo "ERROR - Go Installation not found in PATH!?!"
|
||||
which go >/dev/null && go version && echo "congratulations -- Go installation OK :)"
|
||||
EOF
|
||||
}
|
||||
|
||||
# system accounts
|
||||
# ---------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user