From 376db163b15040b4097043d6a91e975c987e5dab Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Thu, 6 Aug 2020 23:17:11 +0300 Subject: [PATCH] fix: rm -f ~/rpmbuild if this is already symbolic link --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 014e6f1..25c67ed 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,9 @@ srpm: check-activate prep active: activate activate: - ifeq ($(shell test -d $(RPMBUILDDIR); echo $$?), 0) + ifeq ($(shell test -L $(RPMBUILDDIR); echo $$?), 0) + rm -f $(RPMBUILDDIR) + else ifeq ($(shell test -d $(RPMBUILDDIR); echo $$?), 0) mv -f $(RPMBUILDDIR) $(RPMBUILDDIR).old else rm -f $(RPMBUILDDIR)