index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-20 13:49:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-07-05 15:37:19 -0400 |
commit | d9a68fb0e2248636ab6f5f25630693a220ee8a25 (patch) | |
tree | b8efcda6d7b443d59ff0a45f0b786c7a07072b9f | |
parent | 439574a0ff87f9b5e9b070a1028fa3d8461e6f55 (diff) |
-rw-r--r-- | makechrootpkg.in | 14 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 4985172..83eb787 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -272,10 +272,24 @@ _chrootprepare() { _chrootbuild() { # shellcheck source=/dev/null . /etc/profile + local srcext + srcext="$( + # shellcheck source=makepkg-x86_64.conf + . /etc/makepkg.conf || exit + # shellcheck source=PKGBUILD.proto + . /startdir/PKGBUILD || exit + if [ "$arch" = any ]; then + pkgarch=any + else + pkgarch=$CARCH + fi + printf '%s\n' "-$pkgarch$SRCEXT" + )" || return # Beware, there are some stupid arbitrary rules on how you can # use "$" in arguments to commands with "sudo -i". ${foo} or # ${1} is OK, but $foo or $1 isn't. # https://bugzilla.sudo.ws/show_bug.cgi?id=765 + sudo -iu builduser bash -c 'cd /startdir; SRCEXT="${1}" makepkg "${@:2}" --allsource' -bash "$srcext" "$@" || return sudo -iu builduser bash -c 'cd /startdir; makepkg "$@" --noextract --noprepare' -bash "$@" } |