mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
[fix] morty & filtron: don't use golang installed by package manager
When golang is installed via a package manager the local version, which filtron
downloads, is ignored.
BTW: With the new go1.17.2 (cfea51f4
), 'go get' is depricated::
go get: installing executables with 'go get' in module mode is deprecated.
Use 'go install pkg@version' instead.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
Reported-by: @tiekoetter https://github.com/searxng/searxng/pull/455#issuecomment-954918411
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
8f18c69f7a
commit
9f30d5b1f8
2 changed files with 6 additions and 16 deletions
|
@ -340,7 +340,7 @@ EOF
|
||||||
|
|
||||||
cat > "$GO_ENV" <<EOF
|
cat > "$GO_ENV" <<EOF
|
||||||
export GOPATH=\$HOME/go-apps
|
export GOPATH=\$HOME/go-apps
|
||||||
export PATH=\$PATH:\$HOME/local/go/bin:\$GOPATH/bin
|
export PATH=\$HOME/local/go/bin:\$GOPATH/bin:\$PATH
|
||||||
EOF
|
EOF
|
||||||
echo "Environment $GO_ENV has been setup."
|
echo "Environment $GO_ENV has been setup."
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ install_filtron() {
|
||||||
rst_title "Install filtron in user's ~/go-apps" section
|
rst_title "Install filtron in user's ~/go-apps" section
|
||||||
echo
|
echo
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
||||||
go get -v -u github.com/asciimoo/filtron
|
go install -v github.com/asciimoo/filtron@latest
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ update_filtron() {
|
||||||
rst_title "Update filtron" section
|
rst_title "Update filtron" section
|
||||||
echo
|
echo
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
||||||
go get -v -u github.com/asciimoo/filtron
|
go install -v github.com/asciimoo/filtron@latest
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ EOF
|
||||||
|
|
||||||
cat > "$GO_ENV" <<EOF
|
cat > "$GO_ENV" <<EOF
|
||||||
export GOPATH=\$HOME/go-apps
|
export GOPATH=\$HOME/go-apps
|
||||||
export PATH=\$PATH:\$HOME/local/go/bin:\$GOPATH/bin
|
export PATH=\$HOME/local/go/bin:\$GOPATH/bin:\$PATH
|
||||||
EOF
|
EOF
|
||||||
echo "Environment $GO_ENV has been setup."
|
echo "Environment $GO_ENV has been setup."
|
||||||
|
|
||||||
|
@ -359,12 +359,7 @@ install_morty() {
|
||||||
rst_title "Install morty in user's ~/go-apps" section
|
rst_title "Install morty in user's ~/go-apps" section
|
||||||
echo
|
echo
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
||||||
go get -v -u github.com/asciimoo/morty
|
go install -v github.com/asciimoo/morty@latest
|
||||||
EOF
|
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
|
||||||
cd \$GOPATH/src/github.com/asciimoo/morty
|
|
||||||
go test
|
|
||||||
go test -benchmem -bench .
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,12 +367,7 @@ update_morty() {
|
||||||
rst_title "Update morty" section
|
rst_title "Update morty" section
|
||||||
echo
|
echo
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
||||||
go get -v -u github.com/asciimoo/morty
|
go install -v github.com/asciimoo/morty@latest
|
||||||
EOF
|
|
||||||
tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr"
|
|
||||||
cd \$GOPATH/src/github.com/asciimoo/morty
|
|
||||||
go test
|
|
||||||
go test -benchmem -bench .
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue