diff options
author | Jan Steffens <jan.steffens@gmail.com> | 2011-03-18 08:49:37 +0100 |
---|---|---|
committer | Jan Steffens <jan.steffens@gmail.com> | 2011-03-18 12:04:26 +0100 |
commit | 36dc5d8792599c547889fcaa30052b7c09e7add0 (patch) | |
tree | 9225d2865a43727eaf77c2f879a65a8ec2f527e3 /makechrootpkg | |
parent | 96f22cfededae216e127e6fb1d616d003cd8d978 (diff) |
Stop the PACKAGER= and MAKEFLAGS= from piling on
Repeatedly reusing the same chroot kept adding lines to makepkg.conf.
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-x | makechrootpkg | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/makechrootpkg b/makechrootpkg index 9facac6..a38a740 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -161,9 +161,15 @@ if ! grep 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf" fi [ -z "${MAKEFLAGS}" ] && eval $(grep '^MAKEFLAGS=' /etc/makepkg.conf) -[ -n "${MAKEFLAGS}" ] && echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf" +if [ -n "${MAKEFLAGS}" ]; then + sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf" + echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf" +fi [ -z "${PACKAGER}" ] && eval $(grep '^PACKAGER=' /etc/makepkg.conf) -[ -n "${PACKAGER}" ] && echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" +if [ -n "${PACKAGER}" ]; then + sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" + echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" +fi # Set target CARCH as it might be used within the PKGBUILD to select correct sources eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf") |