gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge-plugin-scmsvn/bin tarballs.sh,1.1.1.1,1.2


From: cbayle
Subject: [Gforge-commits] gforge-plugin-scmsvn/bin tarballs.sh,1.1.1.1,1.2
Date: Sat, 11 Dec 2004 17:33:13 -0600

Update of /cvsroot/gforge/gforge-plugin-scmsvn/bin
In directory db.perdue.net:/tmp/cvs-serv9073/gforge-plugin-scmsvn/bin

Modified Files:
        tarballs.sh 
Log Message:
Applied mpeltier patch


Index: tarballs.sh
===================================================================
RCS file: /cvsroot/gforge/gforge-plugin-scmsvn/bin/tarballs.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- tarballs.sh 23 Sep 2004 21:08:18 -0000      1.1.1.1
+++ tarballs.sh 11 Dec 2004 23:33:11 -0000      1.2
@@ -1,26 +1,34 @@
 #! /bin/sh
 # 
-# $Id$
-#
-# Generate CVS repositories tarballs
-# Christian Bayle, Roland Mas, debian-sf (Sourceforge for Debian)
+# Generate SVN repositories tarballs thanks to hot-backup.py
+# Subversion tools - a simple tar.gz file of the SVN repository may
+# lead to an unusable archive.
 
 set -e
+#set -x
 
 if [  $(id -u) != 0 ] ; then
     echo "You must be root to run this, please enter passwd"
     exec su -c "$0 $1"
 fi
 
-CVSROOT=/var/lib/gforge/chroot/cvsroot
-CVSTARDIR=/var/lib/gforge/cvstarballs
+SVNROOT=/var/lib/gforge/chroot/svnroot
+SCMTARDIR=/var/lib/gforge/scmtarballs
+TMPDIR=/tmp
 
 case "$1" in
     generate)
-       cd $CVSROOT
-       ls | while read dir ; do
-           tar czf $CVSTARDIR/${dir}-cvsroot.tar.gz.new ${dir}
-           mv $CVSTARDIR/${dir}-cvsroot.tar.gz.new 
$CVSTARDIR/${dir}-cvsroot.tar.gz
+       # create tmp dir
+       work_dir=$TMPDIR/gforge-plugin-scnsvn.$$
+       mkdir -p $work_dir
+       trap "rm -rf $work_dir" ERR EXIT
+
+       cd $work_dir
+       ls $SVNROOT | while read dir ; do
+           /usr/lib/subversion/hot-backup.py $SVNROOT/$dir . > /dev/null
+           tar czf $dir-scmroot.tar.gz.new $dir*
+           mv -f ${dir}-scmroot.tar.gz.new $SCMTARDIR/${dir}-scmroot.tar.gz
+           rm -rf $dir*
        done
        ;;
     
@@ -33,6 +41,5 @@
     *)
        echo "Usage: $0 {generate}"
        exit 1
-       ;;
-       
+       ;;      
 esac





reply via email to

[Prev in Thread] Current Thread [Next in Thread]