]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
use advzip instead of the 7za hack to make more consistent zip files
authorRudolf Polzer <divverent@alientrap.org>
Mon, 12 Mar 2012 08:13:51 +0000 (09:13 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 12 Mar 2012 08:13:51 +0000 (09:13 +0100)
misc/tools/all/release.subr

index 057175c619413bf9adcebaa17bc47559a82f72a3..3ef2321d07aa2c75dc203745ff75b597c59a63f8 100644 (file)
@@ -52,6 +52,10 @@ release_common()
        mkzipr()
        {
                archive=$1; shift
        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
                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"
                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
        }
 
        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
        }
 
        mkzip0()
        {
                archive=$1; shift
-               zip -0ry "$archive" "$@"
+               zipflags=-0ry
+               zip $zipflags "$archive" "$@" || true
        }
        }
+
        getversion()
        {
                gv=`grep "^gameversion " "$1/defaultXonotic.cfg" | awk '{ print $2 }'`
        getversion()
        {
                gv=`grep "^gameversion " "$1/defaultXonotic.cfg" | awk '{ print $2 }'`