summaryrefslogtreecommitdiffstats
path: root/tools/daisy-img-modify.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/daisy-img-modify.sh')
-rwxr-xr-xtools/daisy-img-modify.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index f172ceec..90910a14 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -211,9 +211,6 @@ cleanup() {
kpartx -dv $raw_imgfile || eliminate
fi
rm -f $raw_imgfile
- if [ -f $imgfile ]; then
- rm -rf $imgfile
- fi
rm -rf $mountdir
}
@@ -239,6 +236,9 @@ error_trap()
main() {
cleanup
+ if [ -f $imgfile ]; then
+ rm -rf $imgfile
+ fi
trap "error_trap" EXIT SIGTERM