chiark / gitweb /
fix Makefile and changelog
[chiark-utils.git] / backup / Makefile
index ce06cee..5e23d06 100644 (file)
@@ -25,10 +25,11 @@ us= chiark-backup
 
 include ../settings.make
 
-BINSCRIPTS=    checkallused loaded driver takedown whatsthis labeltape
-SHARESCRIPTS=  bringup full increm
+BINSCRIPTS=    checkallused loaded driver takedown whatsthis labeltape \
+               snaprsync
+SHARESCRIPTS=  bringup full increm snap-drop
 SHAREFILES=    backuplib.pl
-SNAPKINDS=     lvm remount
+SNAPKINDS=     lvm remountrocp
 
 EXAMPLES=      relativity chiark
 
@@ -41,7 +42,10 @@ install:             all
                        $(INSTALL_SCRIPT) $$s $(bindir)/backup-$$s; done
                $(INSTALL_SHARE) $(SHAREFILES) $(sharedir)
                $(INSTALL_SCRIPT) $(SHARESCRIPTS) $(sharedir)
-               $(INSTALL_SCRIPT) $(SNAPKINDS) $(confdir)/snap
+               set -e; for s in $(SNAPKINDS); do \
+                       d=$(confdir)/snap/$$s; \
+                       test ! -f $$d || d=$$d.dist; \
+                       $(INSTALL_SCRIPT) $$s $$d; done
 
 install-docs:
                $(INSTALL_DIRECTORY) $(txtdocdir)
@@ -54,7 +58,7 @@ install-examples:
                        $(INSTALL_SHARE) [^A-Z]*[^~] $(exampledir)/$$e; \
                        if test -f SYMLINKS.tar; then \
                                exec <SYMLINKS.tar; \
-                               (set -e; cd $(exampledir) && tar -xf -); \
+                               (set -e; cd $(exampledir)/$$e && tar -xf -); \
                        fi; \
                        cd ../..; \
                done