6 case "$from" in /*) ;; *) from=`pwd`/$from ;; esac
7 case "$to" in /*) ;; *) to=`pwd`/$to ;; esac
8 case "$output" in /*) ;; *) output=`pwd`/$output ;; esac
11 data/xonotic-*-data.pk3
12 data/xonotic-*-maps.pk3
13 data/xonotic-*-music.pk3
14 data/xonotic-*-nexcompat.pk3
22 prefix=${wildcard##*\*}
23 suffix=${wildcard%\**}
24 fromversion=${fromname#$prefix}
25 fromversion=${fromversion%$suffix}
26 toversion=${fromname#$prefix}
27 toversion=${fromversion%$suffix}
28 echo "$prefix$fromversion"patch"$toversion$suffix"
31 zipdiff -f "$from" -t "$to" -o "$output" -x "$excludes"
33 tempdir=`mktemp -d -t zipdiff.XXXXXX`
36 for x in $excludes; do
38 (cd a && unzip "$from" "$x")
39 fromname=`find a/ -type f`; fromname=${fromname#a/}
40 (cd b && unzip "$to" "$x")
41 toname=`find b/ -type f`; toname=${toname#b/}
42 patchname=`makepatchname "$x" "$fromname" "$toname"`
43 patchdir="c/$patchname"; patchdir=${patchdir%/*}
45 zipdiff -f a/"$fromname" -t b/"$toname" -o c/"$patchname"
46 if [ -f c/"$patchname" ]; then
47 (cd c && zip -0r "$output" "$patchname")