r3057 - trunk/misc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Dec 27 12:06:21 EST 2007
Author: div0
Date: 2007-12-27 12:06:20 -0500 (Thu, 27 Dec 2007)
New Revision: 3057
Modified:
trunk/misc/makebuild.sh
trunk/misc/zipdiff
Log:
add support for exclude patterns to zipdiff, and use it to exclude the oggs which just got replaygain patched
Modified: trunk/misc/makebuild.sh
===================================================================
--- trunk/misc/makebuild.sh 2007-12-27 14:58:02 UTC (rev 3056)
+++ trunk/misc/makebuild.sh 2007-12-27 17:06:20 UTC (rev 3057)
@@ -44,6 +44,7 @@
osxapps=$buildfiles/osx
copystrip=$buildfiles/copystrip
fteqcc="fteqcc -O2"
+zipdiff=$base/nexuiz-current/misc/zipdiff
fteqccdir="$base/fteqcc"
mingw=/home/polzer/mingw32
@@ -250,7 +251,7 @@
zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
ln -snf nexuizsource$date$ext.zip "$zipdir/nexuizsource-NEWEST.zip"
-zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3
+$zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3 -x 'sound/cdtracks/track*.ogg'
mkdir -p gfx
if unzip "Nexuiz/data/data$date.pk3" gfx/brand.tga; then
zip $zipflags -9r "Nexuiz/data/datapatch$date.pk3" gfx/brand.tga
Modified: trunk/misc/zipdiff
===================================================================
--- trunk/misc/zipdiff 2007-12-27 14:58:02 UTC (rev 3056)
+++ trunk/misc/zipdiff 2007-12-27 17:06:20 UTC (rev 3057)
@@ -13,6 +13,7 @@
output=
from=
to=
+excludes=
while [ $# -gt 0 ]; do
o=$1
@@ -30,6 +31,10 @@
to=$1
shift
;;
+ -x)
+ excludes="$excludes $1"
+ shift
+ ;;
*)
usage
;;
@@ -48,6 +53,8 @@
new|changed|deleted)
echo "$source"
;;
+ excluded)
+ ;;
deleted|*)
echo >&2 " * Sorry, can't handle deletion of $source."
;;
@@ -76,13 +83,27 @@
case "$newline$fromlist$newline" in
*$newline$line$newline*)
# check if equal
- unzip -p "$from" "$line" > "$tempdir/v1"
- unzip -p "$to" "$line" > "$tempdir/v2"
- if ! diff --brief "$tempdir/v1" "$tempdir/v2" >/dev/null 2>&1; then
- found changed "$line"
+ isexcluded=false
+
+ for P in $excludes; do
+ case "$line" in
+ $P)
+ found excluded "$line"
+ isexcluded=true
+ break
+ ;;
+ esac
+ done
+
+ if ! $isexcluded; then
+ unzip -p "$from" "$line" > "$tempdir/v1"
+ unzip -p "$to" "$line" > "$tempdir/v2"
+ if ! diff --brief "$tempdir/v1" "$tempdir/v2" >/dev/null 2>&1; then
+ found changed "$line"
+ fi
+ rm "$tempdir/v1"
+ rm "$tempdir/v2"
fi
- rm "$tempdir/v1"
- rm "$tempdir/v2"
;;
*)
found new "$line"
More information about the nexuiz-commits
mailing list