[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Make get-fields.sh really get run by bash rather than default /bin/sh.
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Date 1168613593 0 # Node ID dccc51cac0274d69a1cb0ee684ddb0d08b536749 # Parent 6a53d3abe7f8e3105d3bfb02a7e3876c1c3222fc Make get-fields.sh really get run by bash rather than default /bin/sh. Also fix some bashisms in the script. Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- xen/include/Makefile | 2 +- xen/tools/get-fields.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff -r 6a53d3abe7f8 -r dccc51cac027 xen/include/Makefile --- a/xen/include/Makefile Fri Jan 12 14:51:27 2007 +0000 +++ b/xen/include/Makefile Fri Jan 12 14:53:13 2007 +0000 @@ -65,7 +65,7 @@ compat/xlat.h: xlat.lst $(filter-out com compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y)) $(BASEDIR)/tools/get-fields.sh Makefile grep -v '^[ ]*#' xlat.lst | \ while read what name hdr; do \ - $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \ + /bin/bash $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \ done >$@.new mv -f $@.new $@ diff -r 6a53d3abe7f8 -r dccc51cac027 xen/tools/get-fields.sh --- a/xen/tools/get-fields.sh Fri Jan 12 14:51:27 2007 +0000 +++ b/xen/tools/get-fields.sh Fri Jan 12 14:53:13 2007 +0000 @@ -111,7 +111,7 @@ for line in sys.stdin.readlines(): case "$token" in struct|union) test $level != 2 || fields=" " - if [ $level == 1 ] + if [ $level = 1 ] then kind=$token if [ $kind = union ] @@ -126,7 +126,7 @@ for line in sys.stdin.readlines(): ;; "}") level=$(expr $level - 1) id= - if [ $level == 1 -a $kind = union ] + if [ $level = 1 -a $kind = union ] then echo " \\" echo -n "$1}" @@ -148,7 +148,7 @@ for line in sys.stdin.readlines(): arrlvl=$(expr $arrlvl - 1) ;; COMPAT_HANDLE\(*\)) - if [ $level == 2 -a -z "$id" ] + if [ $level = 2 -a -z "$id" ] then type=${token#COMPAT_HANDLE?} type=${type%?} @@ -156,7 +156,7 @@ for line in sys.stdin.readlines(): fi ;; compat_domain_handle_t) - if [ $level == 2 -a -z "$id" ] + if [ $level = 2 -a -z "$id" ] then array_type=$token fi @@ -165,7 +165,7 @@ for line in sys.stdin.readlines(): id=$token ;; [\,\;]) - if [ $level == 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] + if [ $level = 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] then if [ $kind = union ] then @@ -257,7 +257,7 @@ build_body() { arrlvl=$(expr $arrlvl - 1) ;; COMPAT_HANDLE\(*\)) - if [ $level == 2 -a -z "$id" ] + if [ $level = 2 -a -z "$id" ] then type=${token#COMPAT_HANDLE?} type=${type%?} @@ -265,7 +265,7 @@ build_body() { fi ;; compat_domain_handle_t) - if [ $level == 2 -a -z "$id" ] + if [ $level = 2 -a -z "$id" ] then array_type=$token fi @@ -279,7 +279,7 @@ build_body() { fi ;; [\,\;]) - if [ $level == 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] + if [ $level = 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] then if [ -z "$array" -a -z "$array_type" ] then @@ -352,7 +352,7 @@ check_field() { id=$token ;; [\,\;]) - if [ $level == 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] + if [ $level = 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] then check_field $1 $2 $3.$id "$fields" test "$token" != ";" || fields= id= @@ -372,11 +372,11 @@ build_check() { do case "$token" in struct|union) - if [ $level == 1 ] + if [ $level = 1 ] then kind=$token echo -n " CHECK_SIZE_($kind, $1)" - elif [ $level == 2 ] + elif [ $level = 2 ] then fields=" " fi @@ -397,7 +397,7 @@ build_check() { test $level != 2 -o $arrlvl != 1 || id=$token ;; [\,\;]) - if [ $level == 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] + if [ $level = 2 -a -n "$(echo $id | $SED 's,^_pad[[:digit:]]*,,')" ] then check_field $kind $1 $id "$fields" test "$token" != ";" || fields= id= _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |