aboutsummaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-01-23 10:37:57 +0000
committerSimon McVittie <smcv@debian.org>2018-01-29 22:35:29 +0000
commitefcbeaa09a2cd7f1f5ca8a13da457400f8fa401d (patch)
tree59a15a1ccf72bd63cfbcaed912284090d678c729 /Makefile.PL
parent3aacac3b46ba79e5e77fcd99f99f94f182283f72 (diff)
downloadikiwiki-efcbeaa09a2cd7f1f5ca8a13da457400f8fa401d.tar
ikiwiki-efcbeaa09a2cd7f1f5ca8a13da457400f8fa401d.tar.gz
build: Use if/then instead of `||` so that the `-e` flag works
Diffstat (limited to 'Makefile.PL')
-rwxr-xr-xMakefile.PL20
1 files changed, 12 insertions, 8 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 3022aa40e..907ff30c9 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -99,8 +99,9 @@ underlay_install:
for dir in `cd underlays && $(FIND) . -follow -type d`; do \
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f ! -name jquery.js ! -name jquery-ui.css ! -name jquery-ui.js ! -name jquery.tmpl.js`; do \
- cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir 2>/dev/null || \
- install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+ if ! cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir 2>/dev/null; then \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+ fi; \
done; \
done
@@ -109,8 +110,9 @@ underlay_install:
set -e; \
for file in doc/ikiwiki/directive/*; do \
if [ -f "$$file" ]; then \
- cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive 2>/dev/null || \
- install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \
+ if ! cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive 2>/dev/null; then \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \
+ fi; \
fi \
done
@@ -125,8 +127,9 @@ underlay_install:
elif echo "$$file" | grep -q base.css; then \
:; \
elif [ -f "$$file" ]; then \
- cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file 2>/dev/null || \
- install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file; \
+ if ! cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file 2>/dev/null; then \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file; \
+ fi; \
fi \
done; \
done
@@ -139,8 +142,9 @@ extra_install: underlay_install
done
set -e; \
for file in `cd doc/examples; $(FIND) . -type f ! -regex '.*discussion.*'`; do \
- cp -pRL doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file 2>/dev/null || \
- install -m 644 doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file; \
+ if ! cp -pRL doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file 2>/dev/null; then \
+ install -m 644 doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file; \
+ fi; \
done
set -e; \