summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'z-distfiles/scripts-gw-1.1/SVN-monthly')
-rwxr-xr-xz-distfiles/scripts-gw-1.1/SVN-monthly30
1 files changed, 30 insertions, 0 deletions
diff --git a/z-distfiles/scripts-gw-1.1/SVN-monthly b/z-distfiles/scripts-gw-1.1/SVN-monthly
new file mode 100755
index 0000000..8c9cc86
--- /dev/null
+++ b/z-distfiles/scripts-gw-1.1/SVN-monthly
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+if [ "x$1" == "x--help" ]; then
+ echo "Usage: SVN-monthly"
+ echo " or: SVN-monthly encrypt@for.user"
+ echo
+ echo "Dumps the subversion repositories to /var/svn/dump"
+ echo "and encrypts the dump if a recipient is given. The dump"
+ echo "is a complete dump."
+ exit 0
+fi
+
+BIN_DUMP="/usr/sbin/SVN-dump"
+
+for REPOSITORY in /var/svn/repos/*
+ do
+ $BIN_DUMP $REPOSITORY /var/svn/dump/`basename $REPOSITORY`.dump full
+done
+
+if [ "x$1" != "x" ]; then
+ for FILE in /var/svn/dump/*.bz2
+ do
+ [ -f $FILE ] && /usr/bin/gpg --default-recipient $1 --encrypt-files $FILE && rm $FILE
+ done
+fi
+
+chown -R apache:apache /var/svn/dump
+chmod 750 /var/svn/dump
+chmod 660 /var/svn/dump/*
+