CI: Improve go path detection in install-cli-tools.sh
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
dcd3c5d8a9
commit
0f5bda320a
1 changed files with 8 additions and 3 deletions
11
scripts/dist/install-go-tools.sh
vendored
11
scripts/dist/install-go-tools.sh
vendored
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Installs Go Tools on Linux
|
||||
# Installs Go tools on Linux
|
||||
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-go-tools.sh)
|
||||
|
||||
PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/scripts:/usr/local/go/bin:/go/bin:$PATH"
|
||||
|
@ -24,9 +24,14 @@ else
|
|||
fi
|
||||
|
||||
DESTARCH=${2:-$SYSTEM_ARCH}
|
||||
GOPATH=$(go env GOPATH)
|
||||
|
||||
echo "Installing Go Tools for ${DESTARCH^^}..."
|
||||
if [ -d "/go" ]; then
|
||||
GOPATH="/go"
|
||||
elif [[ -z $GOPATH ]]; then
|
||||
GOPATH=$(go env GOPATH)
|
||||
fi
|
||||
|
||||
echo "Installing Go tools for ${DESTARCH^^} in $GOPATH..."
|
||||
|
||||
set -e
|
||||
|
||||
|
|
Loading…
Reference in a new issue