makepkg.sh.in: fix a GNU-ism in su invocation

GNU su supports the -c option to specify a command to execute.
However, other flavours of su may have a different interpretation
of the '-c' flag (e.g. FreeBSD and OpenBSD).

The behaviour is correct when '-c' follows an explicit username.

Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Rémy Oudompheng 2011-04-12 21:30:19 +02:00 committed by Dan McGee
parent 8e8391e17c
commit a93e058b68
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ run_pacman() {
if [ "$(type -p sudo)" ]; then
cmd="sudo $cmd"
else
cmd="su -c '$cmd'"
cmd="su root -c '$cmd'"
fi
fi
eval "$cmd"