]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/zipdiff
zipdiff: use a trick from ./all: use BOTH infozip AND 7zip to make best possible...
[xonotic/xonotic.git] / misc / tools / zipdiff
index 4b61c3564be11b00132a2cb38d82578204637d5a..88ea560efb1503b3e913ff56ca62eaff86701314 100755 (executable)
@@ -14,7 +14,19 @@ output=
 from=
 to=
 excludes=
-ziptool="7za a -tzip -mx=9"
+ziptool="mkzip"
+
+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"
+}
 
 while [ $# -gt 0 ]; do
        o=$1