Honor NOSUDO and --prefix in sys/install.sh ##build

This commit is contained in:
pancake 2024-05-11 11:28:49 +02:00 committed by GitHub
parent 0364181115
commit 145df15c75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 9 deletions

View File

@ -38,6 +38,9 @@ for a in $* ; do
'')
:
;;
'--prefix='*)
PREFIX=`echo "$1" | cut -d = -f 2`
;;
--**|-)
shift
CFGARG="${CFGARG} $a"

View File

@ -67,6 +67,7 @@ while : ; do
;;
'--prefix='*)
PREFIX=`echo "$1" | cut -d = -f 2`
ARGS="${ARGS} $1"
;;
-*)
# just for the penguin face case
@ -127,6 +128,7 @@ else
[ -n "${NOSUDO}" ] && SUDO=
fi
if [ "${NOSUDO}" != 1 ]; then
if [ "$(id -u)" = 0 ]; then
SUDO=""
else
@ -141,6 +143,7 @@ fi
if [ "${USE_SU}" = 1 ]; then
SUDO="/bin/su -m root -c"
fi
fi
${SHELL} --help 2> /dev/null | grep -q fish
if [ $? = 0 ]; then