[Evolvis-commits] r231: make svn snapshots only from trunk, like in gforge 4. 8↵

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Jan 18 11:35:38 CET 2010


Author: mirabilos
Date: 2010-01-18 10:35:37 +0000 (Mon, 18 Jan 2010)
New Revision: 231

Added:
   trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
Removed:
   trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
Log:
make svn snapshots only from trunk, like in gforge 4.8


Deleted: trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
===================================================================
--- trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	2010-01-13 15:04:55 UTC (rev 230)
+++ trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	2010-01-18 10:35:37 UTC (rev 231)
@@ -1,61 +0,0 @@
-#!/bin/mksh
-#
-# Generate SVN repositories snapshots.
-
-export LC_ALL=en_US.UTF-8
-unset LANGUAGE
-
-#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
-
-SVNROOT=/var/lib/gforge/chroot/svnroot
-SCMSNAPSHOTSDIR=/var/lib/gforge/scmsnapshots
-TMPDIR=/tmp
-
-compressor='gzip -n9'
-gzip -h 2>&1 | fgrep rsyncable >/dev/null 2>&1 && \
-    compressor="$compressor --rsyncable"
-filext=gz
-#compressor='lzma -9'
-#filext=lzma
-#compressor='xz -C crc32 -9e'
-#filext=xz
-
-case "$1" in
-    generate)
-	# Create temporary dir
-	work_dir=$TMPDIR/gforge-plugin-scnsvn.$$
-	trap "rm -rf $work_dir" ERR EXIT
-
-        today=`date +%Y-%m-%d`
-	cd $SVNROOT
-	for dir in *; do
-	    [[ -e $SVNROOT/$dir ]] || continue
-            # Make tgz archive
-	    mkdir -p $work_dir/$dir-scm-$today
-	    cd $work_dir
-	    svn checkout -q file://$SVNROOT/$dir $dir-scm-$today
-	    tar -cf - $dir-scm-$today | $compressor >$dir-scm-latest.tar.$filext
-	    rm -f $SCMSNAPSHOTSDIR/$dir-scm-latest.tar.*
-	    mv $dir-scm-latest.tar.$filext $SCMSNAPSHOTSDIR/
-	    cd $work_dir
-	    rm -rf $dir-scm-$today
-        done
-        ;;
-
-    update)
-        ;;
-
-    purge)
-        ;;
-
-    *)
-        echo "Usage: $0 {generate}"
-        exit 1
-        ;;
-esac

Copied: trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh (from rev 230, trunk/gforge_base/gforge-4.8.1+evolvis/plugins/scmsvn/cronjobs/snapshots.sh)
===================================================================
--- trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	                        (rev 0)
+++ trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	2010-01-18 10:35:37 UTC (rev 231)
@@ -0,0 +1,63 @@
+#!/bin/mksh
+# $Id$
+#
+# Generate SVN trunk repositories snapshots.
+
+export LC_ALL=en_US.UTF-8
+unset LANGUAGE
+
+#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
+
+SVNROOT=/var/lib/gforge/chroot/svnroot
+SCMSNAPSHOTSDIR=/var/lib/gforge/scmsnapshots
+TMPDIR=/tmp
+
+compressor='gzip -n9'
+gzip -h 2>&1 | fgrep rsyncable >/dev/null 2>&1 && \
+    compressor="$compressor --rsyncable"
+filext=gz
+#compressor='lzma -9'
+#filext=lzma
+#compressor='xz -C crc32 -9e'
+#filext=xz
+
+case "$1" in
+    generate)
+	# Create temporary dir
+	work_dir=$TMPDIR/gforge-plugin-scnsvn.$$
+	trap "rm -rf $work_dir" ERR EXIT
+
+        today=`date +%Y-%m-%d`
+	cd $SVNROOT
+	for dir in *; do
+	    [[ -e $SVNROOT/$dir ]] || continue
+            # Make tgz archive
+	    mkdir -p $work_dir/$dir-scm-$today
+	    cd $work_dir
+	    svn checkout -q file://$SVNROOT/$dir/trunk $dir-scm-$today 2>/dev/null || 
+	    ( rm -fr $dir-scm-$today; svn checkout -q file://$SVNROOT/$dir $dir-scm-$today)
+	    tar -cf - $dir-scm-$today | $compressor >$dir-scm-latest.tar.$filext
+	    rm -f $SCMSNAPSHOTSDIR/$dir-scm-latest.tar.*
+	    mv $dir-scm-latest.tar.$filext $SCMSNAPSHOTSDIR/
+	    cd $work_dir
+	    rm -rf $dir-scm-$today
+        done
+        ;;
+
+    update)
+        ;;
+
+    purge)
+        ;;
+
+    *)
+        echo "Usage: $0 {generate}"
+        exit 1
+        ;;
+esac


Property changes on: trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Author CVSHeader Date Id LastChangedBy LastChangedDate LastChangedRevision Log Revision Source State
Name: svn:mergeinfo
   + 




More information about the evolvis-commits mailing list