summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-12-01 18:03:58 +0000
committerPeter Palfrader <peter@palfrader.org>2005-12-01 18:03:58 +0000
commit589303f92034f46044a8d22aa9282de1e01bb740 (patch)
tree30181098041c8e33cb4dd5469c2055983472dd5f
parenta8f23414d8ab132233e647febac979fca6d08791 (diff)
Only copy/link tree in install if it doesn't yet exist or has a different index.html
-rw-r--r--web/tor-running-routers/Makefile.am13
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