From c03660fd04e8c6496a83e44c9f51b81db0d4be06 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 9 Jun 2013 21:10:19 -0600 Subject: libremakepkg: fix up clean up routines --- src/chroot-tools/libremakepkg | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index baf8015..d2ce222 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -46,12 +46,14 @@ trap_exit() { # # Environment # - $INCHROOT is set -run() { +run() ( local HASNET=true [[ $1 == -N ]] && { HASNET=false; shift; } local copydir=$1; shift local cmd="$*" + trap "rm -f -- '$copydir/chrootexec'" EXIT + cat >"$copydir/chrootexec" <