8 case "$from" in /*) ;; *) from=`pwd`/$from ;; esac
9 case "$to" in /*) ;; *) to=`pwd`/$to ;; esac
10 case "$output" in /*) ;; *) output=`pwd`/$output ;; esac
13 Xonotic/data/xonotic-*-data.pk3
14 Xonotic/data/xonotic-*-maps.pk3
15 Xonotic/data/xonotic-*-music.pk3
16 Xonotic/data/xonotic-*-nexcompat.pk3
17 Xonotic/data/xonotic-*-data-low.pk3
18 Xonotic/data/xonotic-*-maps-low.pk3
19 Xonotic/data/xonotic-*-music-low.pk3
20 Xonotic/data/font-nimbussansl-*.pk3
21 Xonotic/data/font-unifont-*.pk3
22 Xonotic/data/font-xolonium-*.pk3
30 prefix=${wildcard%%\**}
31 suffix=${wildcard#*\*}
32 fromversion=${fromname#$prefix}
33 fromversion=${fromversion%$suffix}
34 toversion=${toname#$prefix}
35 toversion=${toversion%$suffix}
36 echo "$prefix$fromversion"patch"$toversion$suffix"
39 zipdiff -f "$from" -t "$to" -o "$output" -x "$excludes"
40 # or maybe just include ALL not excluded files from $to in $output?
42 tempdir=`mktemp -d -t zipdiff.XXXXXX`
45 for x in $excludes; do
47 (cd a && unzip "$from" "$x")
48 fromname=`find a/ -type f`; fromname=${fromname#a/}
49 (cd b && unzip "$to" "$x")
50 toname=`find b/ -type f`; toname=${toname#b/}
51 patchname=`makepatchname "$x" "$fromname" "$toname"`
52 patchdir="c/$patchname"; patchdir=${patchdir%/*}
54 zipdiff -f a/"$fromname" -t b/"$toname" -o c/"$patchname"
55 if [ -f c/"$patchname" ]; then
56 (cd c && zip -0r "$output" "$patchname")