From: Rudolf Polzer Date: Fri, 6 May 2011 19:59:40 +0000 (+0200) Subject: more work to make the pk3 files rsync-friendly X-Git-Tag: xonotic-v0.5.0~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c24134850a2493b8f261c8aed016627f2ff02121;p=xonotic%2Fxonotic.git more work to make the pk3 files rsync-friendly we try to not store modification times in them (by making the mtime bogus before zipping) --- diff --git a/all b/all index 5d7d198b..e58aa1d0 100755 --- a/all +++ b/all @@ -355,20 +355,31 @@ fix_git_config() verbose git config filter.mapclean.smudge "cat" } +mkzipr() +{ + archive=$1; shift + find "$@" -exec touch -d "1970-01-01 00:00:00 +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 + rm -f "$ziplist" +} + mkzip() { - archive=$1 - shift + archive=$1; shift ziplist=`mktemp` find "$@" -xtype f \( -executable -or -type l \) -print > "$ziplist" - 7za a -tzip -mx=9 -ms=off -x@"$ziplist" "$archive" "$@" || true - zip -9y -@<"$ziplist" "$archive" || true + 7za a -tzip -mx=9 -x@"$ziplist" "$archive" "$@" || true + zip -9y -@<"$ziplist" "$archive" || true rm -f "$ziplist" } mkzip0() { - zip -0ry "$@" + archive=$1; shift + zip -0ry "$archive" "$@" } mirrorspeed() @@ -1835,7 +1846,7 @@ case "$cmd" in fi verbose export git_src_repo="$d0/$src" # skip hash-object verbose "$SELF" release-buildpk3-transform-$transform "Xonotic/temp" - verbose mkzip "../../$dst" * + verbose mkzipr "../../$dst" * verbose cd ../.. verbose rm -rf Xonotic/temp ;;