Makefile: do not remove rpmbuild on fail
authorHarald Hoyer <harald@redhat.com>
Thu, 11 Aug 2011 09:35:21 +0000 (11:35 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 11 Aug 2011 12:27:25 +0000 (14:27 +0200)
Makefile

index b9eb852b1e04f98d5b59dbe3a104a63185131986..7cafbc63f4b504110de48968f9238254d258f391 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -71,9 +71,8 @@ rpm: dracut-$(VERSION).tar.bz2
        cd rpmbuild; ../git2spec.pl $(VERSION) < ../dracut.spec > dracut.spec; \
        rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
                --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
-               --define "_rpmdir $$PWD" -ba dracut.spec || :; \
-       cd ..;
-       mv rpmbuild/noarch/*.rpm .; mv rpmbuild/*.src.rpm .;rm -fr rpmbuild; ls *.rpm
+               --define "_rpmdir $$PWD" -ba dracut.spec && \
+       ( cd ..; mv rpmbuild/noarch/*.rpm .; mv rpmbuild/*.src.rpm .;rm -fr rpmbuild; ls *.rpm )
 
 syncheck:
        @ret=0;for i in dracut-logger modules.d/99base/init modules.d/*/*.sh; do \