From 36dc5d8792599c547889fcaa30052b7c09e7add0 Mon Sep 17 00:00:00 2001 From: Jan Steffens Date: Fri, 18 Mar 2011 08:49:37 +0100 Subject: Stop the PACKAGER= and MAKEFLAGS= from piling on Repeatedly reusing the same chroot kept adding lines to makepkg.conf. --- makechrootpkg | 10 ++++++++-- 1 file 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") -- cgit v1.2.3-70-g09d2