From ff5c01e971d18e4e7785eade4bee55b8914c7f97 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 12 Mar 2012 09:13:51 +0100 Subject: [PATCH] use advzip instead of the 7za hack to make more consistent zip files --- misc/tools/all/release.subr | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 057175c6..3ef2321d 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -52,6 +52,10 @@ release_common() mkzipr() { archive=$1; shift + + # get rid of this hack once we have done large enough changes + # to be no longer rsync compatible (and then enable the below + # code) sevenzipflags=-mx=9 zipflags=-9 find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly @@ -60,25 +64,28 @@ release_common() 7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true zip $zipflags -y -@<"$ziplist" "$archive" || true rm -f "$ziplist" + + #zipflags=-1r + #find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly + #zip $zipflags -y "$archive" "$@" || true + #advzip -4 "$archive" } mkzip() { archive=$1; shift - sevenzipflags=-mx=9 - zipflags=-9 - ziplist=`mktemp` - find "$@" -xtype f \( -executable -or -type l \) -print > "$ziplist" - 7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true - zip $zipflags -y -@<"$ziplist" "$archive" || true - rm -f "$ziplist" + zipflags=-1ry + zip $zipflags "$archive" "$@" || true + advzip -z -4 "$archive" } mkzip0() { archive=$1; shift - zip -0ry "$archive" "$@" + zipflags=-0ry + zip $zipflags "$archive" "$@" || true } + getversion() { gv=`grep "^gameversion " "$1/defaultXonotic.cfg" | awk '{ print $2 }'` -- 2.39.2