This patch fixes the removal of the huge file
/tmp/TMP-AGL-wic-image.wic
Change-Id: I8858109dca62eb20d4bdabab3d7a593205a30ea6
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
if [ -d "$TMPDIR" ]; then
rm -rf "$TMPDIR" || error "Failed to remove $TMPDIR"
fi
if [ -d "$TMPDIR" ]; then
rm -rf "$TMPDIR" || error "Failed to remove $TMPDIR"
fi
- [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] || rm -f $TMP_DIR/TMP-AGL-wic-image.wic
+ [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] && rm -f $TMP_DIR/TMP-AGL-wic-image.wic
}
trap 'die "Signal Received, Aborting..."' HUP INT TERM
}
trap 'die "Signal Received, Aborting..."' HUP INT TERM