Permalink
Browse files

Only ask to remove files if they in fact exist

  • Loading branch information...
1 parent b0a8e93 commit 95662c39c1378f6ac1c32a2c242c73f25df5a504 @dagwieers committed Apr 18, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 Makefile
View
@@ -14,19 +14,19 @@ all:
link:
@echo "= Linking odp backend"
- rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/backends/odp
+ -[[ -e $(DESTDIR)$(sysconfdir)/asciidoc/backends/odp ]] && rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/backends/odp
-ln -sf $(shell pwd)/backends/odp/ $(DESTDIR)$(sysconfdir)/asciidoc/backends/odp
@echo "= Linking odt backend"
rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/backends/odp
- -ln -sf $(shell pwd)/backends/odt/ $(DESTDIR)$(sysconfdir)/asciidoc/backends/odt
+ -[[ -e $(DESTDIR)$(sysconfdir)/asciidoc/backends/odt ]] && rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/backends/odt
@echo "= Linking cv theme"
rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/themes/cv
- -ln -sf $(shell pwd)/themes/cv/ $(DESTDIR)$(sysconfdir)/asciidoc/themes/cv
+ -[[ -e $(DESTDIR)$(sysconfdir)/asciidoc/themes/cv ]] && rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/themes/cv
@echo "= Installing hp theme"
- rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/themes/hp
+ -[[ -e $(DESTDIR)$(sysconfdir)/asciidoc/themes/hp ]] && rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/themes/hp
-ln -sf $(shell pwd)/themes/hp/ $(DESTDIR)$(sysconfdir)/asciidoc/themes/hp
@echo "= Installing code filter"
- rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/filters/code
+ -[[ -e $(DESTDIR)$(sysconfdir)/asciidoc/filters/code ]] && rm -ir $(DESTDIR)$(sysconfdir)/asciidoc/filters/code
-ln -sf $(shell pwd)/filters/code/ $(DESTDIR)$(sysconfdir)/asciidoc/filters/code
install:

0 comments on commit 95662c3

Please sign in to comment.