mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Creates accounts to run PhotoPrism under a custom user ID. Also adds them to the video and render groups, which might help to access hardware transcoding devices.
This commit is contained in:
37
scripts/dist/install-go-tools.sh
vendored
37
scripts/dist/install-go-tools.sh
vendored
@@ -8,13 +8,38 @@ if [[ $(id -u) != "0" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing Go Tools..."
|
||||
if [[ -z "$GOPATH" ]] || [[ -z "$GOBIN" ]]; then
|
||||
echo "\$GOPATH and \$GOBIN must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SYSTEM_ARCH=$("$(dirname "$0")/arch.sh")
|
||||
DESTARCH=${2:-$SYSTEM_ARCH}
|
||||
|
||||
echo "Installing Go Tools for ${DESTARCH^^}..."
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p "$GOPATH/src" "$GOBIN"
|
||||
|
||||
go install github.com/tianon/gosu@latest
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install github.com/kyoh86/richgo@latest
|
||||
go install github.com/psampaz/go-mod-outdated@latest
|
||||
go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest
|
||||
go install github.com/mikefarah/yq/v4@latest
|
||||
|
||||
# no additional tools on ARMv7 to reduce build time
|
||||
if [[ $DESTARCH != "arm" ]]; then
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install github.com/psampaz/go-mod-outdated@latest
|
||||
go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest
|
||||
go install github.com/mikefarah/yq/v4@latest
|
||||
|
||||
go install github.com/kyoh86/richgo@latest
|
||||
cp "$GOBIN/richgo" /usr/local/bin/richgo
|
||||
fi
|
||||
|
||||
chmod -R a+rwX "$GOPATH"
|
||||
|
||||
# install gosu in /usr/local/sbin
|
||||
cp "$GOBIN/gosu" /usr/local/sbin/gosu
|
||||
chown root:root /usr/local/sbin/gosu
|
||||
chmod 755 /usr/local/sbin/gosu
|
||||
|
||||
echo "Done."
|
||||
|
||||
Reference in New Issue
Block a user