]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
more work to make the pk3 files rsync-friendly
authorRudolf Polzer <divverent@alientrap.org>
Fri, 6 May 2011 19:59:40 +0000 (21:59 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 6 May 2011 19:59:40 +0000 (21:59 +0200)
we try to not store modification times in them (by making the mtime bogus
before zipping)

all

diff --git a/all b/all
index 5d7d198bab9d37bf6d0cb20ac2bc065bc9bf4cc3..e58aa1d0a67cc2637382e837e6a2f1df162cda7a 100755 (executable)
--- 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
                ;;