From 45378daff04b7137528b5425c8dc8bf3acd25005 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 24 May 2011 10:50:37 +0200 Subject: [PATCH] speed up zip compression when not making a finished release --- all | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/all b/all index 381e9f7f..edd3af9f 100755 --- 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" } -- 2.39.2