From: Rudolf Polzer Date: Mon, 12 Mar 2012 08:13:51 +0000 (+0100) Subject: use advzip instead of the 7za hack to make more consistent zip files X-Git-Tag: xonotic-v0.7.0~69 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=ff5c01e971d18e4e7785eade4bee55b8914c7f97 use advzip instead of the 7za hack to make more consistent zip files --- 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 }'`