chiark / gitweb /
svn-backup:
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Sat, 7 Jun 2003 11:40:31 +0000 (11:40 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Sat, 7 Jun 2003 11:40:31 +0000 (11:40 +0000)
  Compress dumpfiles with bzip2.
  Exit silently if a dumpfile already exists for this revision.
  Use "new" 'svnadmin dump' revision syntax (subversion r3258, not exactly
  recent; oh well).
  Use --quiet option to 'svnadmin dump', added in subversion r4912.

svn-backup

index c05dd045d29468bbf2ea11a33b21e6b80c52cdb8..918c860ab888a6aeede0c40ca4015d162e587633 100755 (executable)
@@ -22,6 +22,11 @@ if [ "`expr "$REV" : '[0-9]\+'`" -eq 0 ]; then
     exit 1
 fi
 
-$SVNADMIN dump "$REPOS" 0 "$REV" > "$DUMP.$REV"
+if [ -f "$DUMP.$REV" ] || [ -f "$DUMP.$REV.bz2" ]; then
+    exit 0
+else
+    $SVNADMIN dump --quiet "$REPOS" -r 0:"$REV" > "$DUMP.$REV"
+    bzip2 "$DUMP.$REV"
+fi
 
 exit 0