summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-10-01 21:30:24 +0200
committerDave Reisner <dreisner@archlinux.org>2011-10-01 21:30:24 +0200
commit407775cd739d8dde0b41636862f2fd4244bed06f (patch)
treea3886a3aca9e4321d9907eaca4f72a01d9d8b599
parentda9d5608ab41d498084731edcc95e98330cea83f (diff)
downloadmkinitcpio-407775cd739d8dde0b41636862f2fd4244bed06f.tar.gz
mkinitcpio-407775cd739d8dde0b41636862f2fd4244bed06f.tar.xz
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 <dreisner@archlinux.org>
-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"