diff options
author | Peter Palfrader <peter@palfrader.org> | 2005-12-01 18:03:58 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2005-12-01 18:03:58 +0000 |
commit | 589303f92034f46044a8d22aa9282de1e01bb740 (patch) | |
tree | 30181098041c8e33cb4dd5469c2055983472dd5f /web/tor-running-routers/Makefile.am | |
parent | a8f23414d8ab132233e647febac979fca6d08791 (diff) |
Only copy/link tree in install if it doesn't yet exist or has a different index.html
Diffstat (limited to 'web/tor-running-routers/Makefile.am')
-rw-r--r-- | web/tor-running-routers/Makefile.am | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/web/tor-running-routers/Makefile.am b/web/tor-running-routers/Makefile.am index 4cc998c..a4217b7 100644 --- a/web/tor-running-routers/Makefile.am +++ b/web/tor-running-routers/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = based_in = htdocs include $(top_srcdir)/Makefile.common -doc_DATA = result/index.html +doc_DATA = result/index.html: $(TOR_RUNNING_ROUTERS_BASE)/result/index.html # rm -rf result @@ -31,10 +31,13 @@ install-data-local: result/index.html # cp -a result/.htaccess $(docdir) # rsync -r --delete result/ $(docdir)/ rm -rf $(docdir).new/ - cp -al result/ $(docdir).new/ - mv $(docdir) $(docdir).old - mv $(docdir).new $(docdir) - rm -rf $(docdir).old/ + if ! [ -e $(docdir)/index.html ] || \ + [ "$$(stat -c '%i' result/index.html )" -ne "$$(stat -c '%i' $(docdir)/index.html )" ]; then \ + cp -al result/ $(docdir).new/ && \ + mv $(docdir) $(docdir).old && \ + mv $(docdir).new $(docdir) && \ + rm -rf $(docdir).old/; \ + fi uninstall-local: rm -f $(docdir)/*.png |