[Evolvis-commits] r229: same as r228↵

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Jan 11 11:08:28 CET 2010


Author: mirabilos
Date: 2010-01-11 10:08:26 +0000 (Mon, 11 Jan 2010)
New Revision: 229

Modified:
   trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
Log:
same as r228


Modified: trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh
===================================================================
--- trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	2010-01-11 09:48:18 UTC (rev 228)
+++ trunk/gforge_base/gforge_plugins/gforge-plugin-scmsvn/bin/snapshots.sh	2010-01-11 10:08:26 UTC (rev 229)
@@ -17,6 +17,15 @@
 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
@@ -31,8 +40,11 @@
 	    mkdir -p $work_dir/$dir-scm-$today
 	    cd $work_dir
 	    svn checkout -q file://$SVNROOT/$dir $dir-scm-$today
-            tar czf $dir-scm-latest.tar.gz $dir-scm-$today
-            mv $dir-scm-latest.tar.gz $SCMSNAPSHOTSDIR
+	    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
         ;;
 




More information about the evolvis-commits mailing list