]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
use infozip to make patches due to symlinks
authorRudolf Polzer <divverent@xonotic.org>
Fri, 9 Mar 2012 15:59:57 +0000 (16:59 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 9 Mar 2012 15:59:57 +0000 (16:59 +0100)
misc/tools/xzipdiff
misc/tools/zipdiff

index eaaa1fa259af4dc866c1c826d669ecf3dbc6d6d2..48ad7df690a57799ce15d01c8e4cd6fcbffbf562 100755 (executable)
@@ -31,7 +31,7 @@ makepatchname()
        echo "$prefix$fromversion"patch"$toversion$suffix"
 }
 
-zipdiff -f "$from" -t "$to" -o "$output" -x "$excludes"
+zipdiff -z "zip -9r" -f "$from" -t "$to" -o "$output" -x "$excludes"
 
 tempdir=`mktemp -d -t zipdiff.XXXXXX`
 cd "$tempdir"
@@ -45,7 +45,7 @@ for x in $excludes; do
        patchname=`makepatchname "$x" "$fromname" "$toname"`
        patchdir="c/$patchname"; patchdir=${patchdir%/*}
        mkdir -p "$patchdir"
-       zipdiff -f a/"$fromname" -t b/"$toname" -o c/"$patchname"
+       zipdiff -z "zip -9r" -f a/"$fromname" -t b/"$toname" -o c/"$patchname"
        if [ -f c/"$patchname" ]; then
                (cd c && zip -0r "$output" "$patchname")
        fi
index aa90c771e6d8ee2b0151e61da4a01104238db708..4b61c3564be11b00132a2cb38d82578204637d5a 100755 (executable)
@@ -14,6 +14,7 @@ output=
 from=
 to=
 excludes=
+ziptool="7za a -tzip -mx=9"
 
 while [ $# -gt 0 ]; do
        o=$1
@@ -35,6 +36,10 @@ while [ $# -gt 0 ]; do
                        excludes="$excludes $1"
                        shift
                        ;;
+               -z)
+                       ziptool=$1
+                       shift
+                       ;;
                *)
                        usage
                        ;;
@@ -163,8 +168,7 @@ case "$output" in
                                        ;;
                        esac
                        cd "$tempdir"
-                       #zip -9r "$output" .
-                       7za a -tzip -mx=9 "$output" .
+                       $ziptool "$output" .
                        cd ..
                fi
                ;;