From c850ed3ca8b69c759078f25d6d2fc8e57f8027c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 17 Mar 2015 23:24:42 +0100 Subject: [PATCH] Do not fail in case of no directory to cleanup There is "set -e", so previous version fails when there is no directory to cleanup. --- build_template_rpm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_template_rpm b/build_template_rpm index fea85d2..f2ebd6d 100755 --- a/build_template_rpm +++ b/build_template_rpm @@ -24,4 +24,6 @@ rpmbuild --target noarch \ --define "_tmppath $PWD/rpmbuild/tmp" \ -bb templates.spec -[ -d appmenus-$$ ] && rm -rf appmenus-$$ appmenus +if [ -d appmenus-$$ ]; then + rm -rf appmenus-$$ appmenus +fi