[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 890
Date       : Wed Apr 26 10:33:32 BST 2006

Changed paths:
   M /Trunk/XaraLX/Scripts/build-resources.sh

Fixed minor bug


Diff:
Index: Trunk/XaraLX/Scripts/build-resources.sh
===================================================================
--- Trunk/XaraLX/Scripts/build-resources.sh	(revision 889)
+++ Trunk/XaraLX/Scripts/build-resources.sh	(revision 890)
@@ -19,7 +19,7 @@
 if ! [ -e xrc/xrc.d ] ; then touch xrc/xrc.d ; sleep 1 ; fi
 ( find $TOPDIR/wxOil/xrc/$XARALANGUAGE -maxdepth 1 -name '*.xrc' ; find $TOPDIR/wxOil/xrc -maxdepth 1 -name '*.png' -or -name '*.ico' -or -name '*.cur' -or -name '*.bmp' -or -name '*.res' -or -name '*.xar' ) | perl -e 'while(<>) {chomp; s/
//; push @F, $_}; printf "xrc/dialogs.xrc xrc/strings.xrc xrc/strings.lst xrc/xaralx.po: xrc/xrc.stamp %s
",join (" ",sort @F);' > xrc/xrc.d.$$ ;
 if ( ! ( cmp -s xrc/xrc.d.$$ xrc/xrc.d) ) ; then touch xrc/xrc.stamp ; mv xrc/xrc.d.$$ xrc/xrc.d ; echo Found new resources 1>&2 ; NEWRES=1; else rm -f xrc/xrc.d.$$; fi ;
-if ! [ -e xrc/xrc.stamp ] ; then touch xrc/xrc.stamp ; fi
+if ! [ -e xrc/xrc.stamp ] ; then touch xrc/xrc.stamp ; NEWRES=1; fi
 
 # we should here go through all the files in xrc.d and check their dates
 
@@ -29,7 +29,11 @@
 XRCALL=`perl -ane 'foreach $f (@F) { push @G,$f if $f=~/${XARALANGUAGE}\/.+$/ };print join(" ",@G)."
";' < xrc/xrc.d`
 
 if test "$NEWRES" -eq 0 ; then
-	NEWRES=`echo $XRCALL xrc/xrc.stamp | perl -ane '$x=0;$m=(stat("resources.cpp"))[9];foreach $f (@F) {if ((stat($f))[9]>$m) {$x=1;break;}};print "$x
";'`
+	if ! [ -e resources.cpp ] ; then
+		NEWRES=1
+	else
+		NEWRES=`echo $XRCALL xrc/xrc.stamp | perl -ane '$x=0;$m=(stat("resources.cpp"))[9];foreach $f (@F) {if ((stat($f))[9]>$m) {$x=1;break;}};print "$x
";'`
+	fi
 fi
 
 if test "$NEWRES" -eq 1 ; then


Xara