r5839 - trunk/data
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Feb 11 15:25:23 EST 2009
Author: div0
Date: 2009-02-11 15:25:09 -0500 (Wed, 11 Feb 2009)
New Revision: 5839
Modified:
trunk/data/update-cvarcount.sh
Log:
avoid touching QC files when they don't change (works better with make)
Modified: trunk/data/update-cvarcount.sh
===================================================================
--- trunk/data/update-cvarcount.sh 2009-02-11 16:50:03 UTC (rev 5838)
+++ trunk/data/update-cvarcount.sh 2009-02-11 20:25:09 UTC (rev 5839)
@@ -13,9 +13,18 @@
sed -i "s/^set cvar_check_weapons .*/set cvar_check_weapons $countw/" weapons.cfg
sed -i "s/^set cvar_check_weapons .*/set cvar_check_weapons $countw/" weaponsHavoc.cfg
-sed -i "s/^string CVAR_CHECK_DEFAULT = .*/string CVAR_CHECK_DEFAULT = \"$countd\";/" qcsrc/server/constants.qh
-sed -i "s/^string CVAR_CHECK_WEAPONS = .*/string CVAR_CHECK_WEAPONS = \"$countw\";/" qcsrc/server/constants.qh
+sed "
+ s/^string CVAR_CHECK_DEFAULT = .*/string CVAR_CHECK_DEFAULT = \"$countd\";/;
+ s/^string CVAR_CHECK_WEAPONS = .*/string CVAR_CHECK_WEAPONS = \"$countw\";/;
+" qcsrc/server/constants.qh > qcsrc/server/constants.qh.new
-[ -z "$DO_NOT_RUN_MAKE" ] && make
-
-echo "New checksums: $countd, $countw; please recompile!"
+if ! diff qcsrc/server/constants.qh qcsrc/server/constants.qh.new; then
+ mv qcsrc/server/constants.qh.new qcsrc/server/constants.qh
+ if [ -z "$DO_NOT_RUN_MAKE" ]; then
+ make
+ else
+ echo "New checksums: $countd, $countw; please recompile!"
+ fi
+else
+ rm -f qcsrc/server/constants.qh.new
+fi
More information about the nexuiz-commits
mailing list