2
0
mirror of https://github.com/bpkg/bpkg synced 2024-11-19 15:25:36 +00:00

Setup to $HOME/.local if run as non root user

This commit is contained in:
Jean Claveau 2019-12-05 14:25:19 +01:00 committed by Joseph Werle
parent 66ffdf24df
commit ab8f787e4b

View File

@ -60,7 +60,13 @@ setup () {
## make targets
BIN="bpkg"
[ -z "$PREFIX" ] && PREFIX="/usr/local"
if [ -z "$PREFIX" ]; then
if [ $USER == 'root' ]; then
PREFIX="/usr/local"
else
PREFIX="$HOME/.local"
fi
fi
# All 'bpkg' supported commands
CMDS="json install package term suggest init utils update list show getdeps"