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-xolonium-*.pk3
29 prefix=${wildcard%%\**}
30 suffix=${wildcard#*\*}
31 fromversion=${fromname#$prefix}
32 fromversion=${fromversion%$suffix}
33 toversion=${toname#$prefix}
34 toversion=${toversion%$suffix}
35 echo "$prefix$fromversion"patch"$toversion$suffix"
38 zipdiff -f "$from" -t "$to" -o "$output" -x "$excludes"
39 # or maybe just include ALL not excluded files from $to in $output?
41 tempdir=`mktemp -d -t zipdiff.XXXXXX`
44 for x in $excludes; do
46 (cd a && unzip "$from" "$x")
47 fromname=`find a/ -type f`; fromname=${fromname#a/}
48 (cd b && unzip "$to" "$x")
49 toname=`find b/ -type f`; toname=${toname#b/}
50 patchname=`makepatchname "$x" "$fromname" "$toname"`
51 patchdir="c/$patchname"; patchdir=${patchdir%/*}
53 zipdiff -f a/"$fromname" -t b/"$toname" -o c/"$patchname"
54 if [ -f c/"$patchname" ]; then
55 (cd c && zip -0r "$output" "$patchname")