diff --git a/setup.sh b/setup.sh index fe4c3e3..20a9ee7 100755 --- a/setup.sh +++ b/setup.sh @@ -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"