19 lines
402 B
Text
19 lines
402 B
Text
|
#!/usr/bin/env zsh
|
||
|
|
||
|
maybe_sudo() {
|
||
|
if which sudo >/dev/null; then
|
||
|
sudo "$@"
|
||
|
else
|
||
|
if [ "$1" = "-u" ]; then
|
||
|
shift; shift
|
||
|
fi
|
||
|
"$@"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
set -e
|
||
|
maybe_sudo -u "$USER" makepkg -Rfp PKGBUILD.binutils
|
||
|
maybe_sudo -u "$USER" makepkg -Rfp PKGBUILD.bootstrap
|
||
|
maybe_sudo -u "$USER" makepkg -Rfp PKGBUILD.newlib
|
||
|
maybe_sudo -u "$USER" makepkg -Rfp PKGBUILD.gcc
|