photoprism/scripts/dist/install-cli-tools.sh
Michael Mayer 4ab35c4dc7 CI: Improve scripts/dist/install-go.sh and add install-cli-tools.sh
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-07-23 14:57:17 +02:00

23 lines
No EOL
520 B
Bash

#!/usr/bin/env bash
# Installs CLI Tools on Linux
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-cli-tools.sh)
# abort if not executed as root
if [[ $(id -u) != "0" ]]; then
echo "Usage: run ${0##*/} as root" 1>&2
exit 1
fi
set -eux;
if ! command -v go &> /dev/null
then
echo "Go must be installed."
exit 1
fi
echo "Installing CLI Tools..."
GOBIN="/usr/local/bin" go install github.com/muesli/duf@latest
ln -sf /usr/local/bin/duf /usr/local/bin/df