]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
speed up zip compression when not making a finished release
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 24 May 2011 08:50:37 +0000 (10:50 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 24 May 2011 08:50:37 +0000 (10:50 +0200)
all

diff --git a/all b/all
index 381e9f7fb5c3206983e35e7481b15357fbe83faf..edd3af9fbb0d4e1094ada6148b6580595dec53d5 100755 (executable)
--- a/all
+++ b/all
@@ -358,21 +358,41 @@ fix_git_config()
 mkzipr()
 {
        archive=$1; shift
+       case "$RELEASETYPE" in
+               release)
+                       sevenzipflags=-mx=9
+                       zipflags=-9
+                       ;;
+               *)
+                       sevenzipflags=-mx=1
+                       zipflags=-1
+                       ;;
+       esac
        find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly
        ziplist=`mktemp`
        find "$@" -xtype f \( -executable -or -type l \) -print > "$ziplist"
-       7za a -tzip -mx=9 -x@"$ziplist" "$archive" "$@" || true
-       zip         -9y   -@<"$ziplist" "$archive"      || true
+       7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true
+       zip         $zipflags -y   -@<"$ziplist" "$archive"      || true
        rm -f "$ziplist"
 }
 
 mkzip()
 {
        archive=$1; shift
+       case "$RELEASETYPE" in
+               release)
+                       sevenzipflags=-mx=9
+                       zipflags=-9
+                       ;;
+               *)
+                       sevenzipflags=-mx=1
+                       zipflags=-1
+                       ;;
+       esac
        ziplist=`mktemp`
        find "$@" -xtype f \( -executable -or -type l \) -print > "$ziplist"
-       7za a -tzip -mx=9 -x@"$ziplist" "$archive" "$@" || true
-       zip         -9y   -@<"$ziplist" "$archive"      || true
+       7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true
+       zip         $zipflags -y   -@<"$ziplist" "$archive"      || true
        rm -f "$ziplist"
 }