From 310019ea3c1df17217e82f0c9b8c48804885033d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 24 May 2018 04:03:47 +0200 Subject: [PATCH] Remove raw root.img after packaging it into rpm - if DISCARD_PREPARED_IMAGE is set --- build_template_rpm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_template_rpm b/build_template_rpm index 52a7490..69122b5 100755 --- a/build_template_rpm +++ b/build_template_rpm @@ -26,3 +26,7 @@ rpmbuild --target noarch \ --define "_topdir $PWD/rpmbuild" \ --define "_tmppath $PWD/rpmbuild/tmp" \ -bb templates.spec + +if [ "0$DISCARD_PREPARED_IMAGE" -eq "1" ]; then + rm -rf "qubeized_images/$NAME" +fi