summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio6
1 files 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"