From 407775cd739d8dde0b41636862f2fd4244bed06f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 1 Oct 2011 15:30:24 -0400 Subject: mkinitcpio: avoid creating savelist in main loop If PRESET is set, we're in the main loop, not a worker process. No image will ever be created here, so there's never a need for saving any build dir. Signed-off-by: Dave Reisner --- mkinitcpio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkinitcpio b/mkinitcpio index 5e57665..37db805 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -60,10 +60,10 @@ EOF cleanup 1 } -cleanup () -{ +cleanup() { if [[ $TMPDIR ]]; then - if (( $SAVELIST )); then + # when PRESET is set, we're in the main loop, not a worker process + if (( SAVELIST )) && [[ -z $PRESET ]]; then msg "build directory saved in %s" "$TMPDIR" else rm -rf "$TMPDIR" -- cgit v1.2.3-24-g4f1b