]> sipb.mit.edu Git - ikiwiki.git/commitdiff
preserve underlay file times
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 19 Oct 2008 23:25:23 +0000 (19:25 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 19 Oct 2008 23:25:23 +0000 (19:25 -0400)
I'd like to preserve the mtime and ctime of files in the underlay if
possible, to avoid ikiwiki thinking they've changed and refreshing them
each time it's upgraded.

But, fall back to the old install command for systems that lack cp -a.

Makefile.PL

index 95e574c66f370e9ade0816fb92c6c29e03a8ab54..2137b9dde2d080ab2664ec0bea601d67af74873c 100755 (executable)
@@ -54,6 +54,7 @@ extra_install:
        for dir in `cd underlays && find . -follow -type d ! -regex '.*\.svn.*'`; do \
                install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
                for file in `find underlays/$$dir -follow -maxdepth 1 -type f`; do \
+                       cp -aL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir || \
                        install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
                done; \
        done