diff options
author | Dave Heller <hellerda@linux.vnet.ibm.com> | 2018-04-16 01:00:44 -0400 |
---|---|---|
committer | Dave Heller <hellerda@linux.vnet.ibm.com> | 2018-04-16 01:00:44 -0400 |
commit | a9a28ccf787f49acbef5c0d8c36530ca60fcd123 (patch) | |
tree | 7731fc44763d34c509a9a885f5350831bddc3e58 | |
parent | 61a4f1bd4be7503d18aa1a73be091ff42f730e0a (diff) | |
download | sb-signing-utils-a9a28ccf787f49acbef5c0d8c36530ca60fcd123.tar.gz sb-signing-utils-a9a28ccf787f49acbef5c0d8c36530ca60fcd123.zip |
Cleanup scratch container file
If no --out is provide we use a scratch file for output container. But
there is no reason to keep this; if the user wants a persistent file he
can specify --out.
Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
-rwxr-xr-x | crtSignedContainer.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crtSignedContainer.sh b/crtSignedContainer.sh index 4614000..31b96fb 100755 --- a/crtSignedContainer.sh +++ b/crtSignedContainer.sh @@ -415,6 +415,9 @@ fi if [ -z "$OUTPUT" ] || [ "$OUTPUT" == __none ] then OUTPUT="$SB_SCRATCH_DIR/$(to_lower "$buildID").scratch.out.img" + OUTPUT_SCRATCH=true +else + OUTPUT_SCRATCH=false fi # @@ -845,4 +848,8 @@ if [ $SB_KEEP_CACHE == false ]; then rm -rf "$TOPDIR" fi +if [ $OUTPUT_SCRATCH == true ]; then + rm "$OUTPUT" +fi + exit $RC |