fix: rm -f ~/rpmbuild if this is already symbolic link

This commit is contained in:
GenZmeY 2020-08-06 23:17:11 +03:00
parent 75d79078e2
commit 007ed8fd8b

View File

@ -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)