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 30e10be887
commit 376db163b1

View File

@ -59,7 +59,9 @@ srpm: check-activate prep
active: activate active: activate
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 mv -f $(RPMBUILDDIR) $(RPMBUILDDIR).old
else else
rm -f $(RPMBUILDDIR) rm -f $(RPMBUILDDIR)