chiark / gitweb /
fix Makefile and changelog
[chiark-utils.git] / backup / Makefile
index a8c767e14b12b97a1e964ff8a64a131ac035e98e..5e23d06b87a9e0110ef01c1b6bf60aa1479453b5 100644 (file)
@@ -26,10 +26,10 @@ us= chiark-backup
 include ../settings.make
 
 BINSCRIPTS=    checkallused loaded driver takedown whatsthis labeltape \
 include ../settings.make
 
 BINSCRIPTS=    checkallused loaded driver takedown whatsthis labeltape \
-               snap-drop
-SHARESCRIPTS=  bringup full increm
+               snaprsync
+SHARESCRIPTS=  bringup full increm snap-drop
 SHAREFILES=    backuplib.pl
 SHAREFILES=    backuplib.pl
-SNAPKINDS=     lvm remount
+SNAPKINDS=     lvm remountrocp
 
 EXAMPLES=      relativity chiark
 
 
 EXAMPLES=      relativity chiark
 
@@ -42,7 +42,10 @@ install:             all
                        $(INSTALL_SCRIPT) $$s $(bindir)/backup-$$s; done
                $(INSTALL_SHARE) $(SHAREFILES) $(sharedir)
                $(INSTALL_SCRIPT) $(SHARESCRIPTS) $(sharedir)
                        $(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)
 
 install-docs:
                $(INSTALL_DIRECTORY) $(txtdocdir)
@@ -55,7 +58,7 @@ install-examples:
                        $(INSTALL_SHARE) [^A-Z]*[^~] $(exampledir)/$$e; \
                        if test -f SYMLINKS.tar; then \
                                exec <SYMLINKS.tar; \
                        $(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
                        fi; \
                        cd ../..; \
                done