(svn r16783) -Change: make it more clear that the squirrel_export script needs gawk.
This commit is contained in:
		@@ -2,6 +2,15 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# $Id$
 | 
					# $Id$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# We really need gawk for this!
 | 
				
			||||||
 | 
					AWK=gawk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${AWK} --version > /dev/null 2> /dev/null
 | 
				
			||||||
 | 
					if [ "$?" != "0" ]; then
 | 
				
			||||||
 | 
						echo "This script needs gawk to run properly"
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This must be called from within the src/ai/api directory.
 | 
					# This must be called from within the src/ai/api directory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -z "$1" ]; then
 | 
					if [ -z "$1" ]; then
 | 
				
			||||||
@@ -10,7 +19,7 @@ if [ -z "$1" ]; then
 | 
				
			|||||||
			# these files should not be changed by this script
 | 
								# these files should not be changed by this script
 | 
				
			||||||
			"ai_controller.hpp" | "ai_object.hpp" | "ai_types.hpp" ) continue;
 | 
								"ai_controller.hpp" | "ai_object.hpp" | "ai_types.hpp" ) continue;
 | 
				
			||||||
		esac
 | 
							esac
 | 
				
			||||||
		awk -f squirrel_export.awk ${f} > ${f}.tmp
 | 
							${AWK} -f squirrel_export.awk ${f} > ${f}.tmp
 | 
				
			||||||
		if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -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
 | 
								mv ${f}.tmp ${f}.sq
 | 
				
			||||||
			echo "Updated: ${f}.sq"
 | 
								echo "Updated: ${f}.sq"
 | 
				
			||||||
@@ -22,7 +31,7 @@ if [ -z "$1" ]; then
 | 
				
			|||||||
		fi
 | 
							fi
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	awk -f squirrel_export.awk $1 > $1.tmp
 | 
						${AWK} -f squirrel_export.awk $1 > $1.tmp
 | 
				
			||||||
	if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b $1.sq $1.tmp 2> /dev/null || echo boo`" ]; 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
 | 
							mv $1.tmp $1.sq
 | 
				
			||||||
		echo "Updated: $1.sq"
 | 
							echo "Updated: $1.sq"
 | 
				
			||||||
@@ -84,7 +93,7 @@ echo "
 | 
				
			|||||||
{ print \$0; }
 | 
					{ print \$0; }
 | 
				
			||||||
" > ${f}.awk
 | 
					" > ${f}.awk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
awk -f ${f}.awk ${f} > ${f}.tmp
 | 
					${AWK} -f ${f}.awk ${f} > ${f}.tmp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then
 | 
					if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then
 | 
				
			||||||
	mv ${f}.tmp ${f}
 | 
						mv ${f}.tmp ${f}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user