(svn r12879) [NoAI] -Fix: two bugs in $Id$ handling of squirrel_export, and one fix for future problems
--- a/src/ai/api/squirrel_export.awk Wed Apr 23 12:05:32 2008 +0000
+++ b/src/ai/api/squirrel_export.awk Thu Apr 24 23:29:01 2008 +0000
@@ -42,7 +42,9 @@
}
/@file/ {
- print "/* $Id$ */"
+ # Break it in two lines, so SVN doesn't replace it
+ printf "/* $I"
+ print "d$ */"
print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */"
print ""
print "#include \"" $3 "\""
--- a/src/ai/api/squirrel_export.sh Wed Apr 23 12:05:32 2008 +0000
+++ b/src/ai/api/squirrel_export.sh Thu Apr 24 23:29:01 2008 +0000
@@ -9,7 +9,7 @@
"ai_controller.hpp" | "ai_object.hpp") continue;
esac
awk -f squirrel_export.awk ${f} > ${f}.tmp
- if ! [ -f "${f}.sq" ] || [ -n "`diff -b ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then
+ if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then
mv ${f}.tmp ${f}.sq
echo "Updated: ${f}.sq"
svn add ${f}.sq > /dev/null 2>&1
@@ -21,7 +21,7 @@
done
else
awk -f squirrel_export.awk $1 > $1.tmp
- if ! [ -f "${f}.sq" ] || [ -n "`diff -b $1.sq $1.tmp`" ]; then
+ if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then
mv $1.tmp $1.sq
echo "Updated: $1.sq"
svn add $1.sq > /dev/null 2>&1
@@ -80,7 +80,7 @@
awk -f ${f}.awk ${f} > ${f}.tmp
-if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp`" ]; then
+if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then
mv ${f}.tmp ${f}
echo "Updated: ${f}"
else