From 589303f92034f46044a8d22aa9282de1e01bb740 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 1 Dec 2005 18:03:58 +0000 Subject: Only copy/link tree in install if it doesn't yet exist or has a different index.html --- web/tor-running-routers/Makefile.am | 13 ++++++++----- 1 file 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 -- cgit v1.2.3