18 lines
402 B
Bash
18 lines
402 B
Bash
#!/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
|