From cf66924f81f022942e14b4e613f1bf0dd2bdf0eb Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Sat, 27 Nov 2010 00:43:04 +0000 Subject: [PATCH] Detect missing config includes Terminate make_device_config.sh if the awk command fails. Typically this means a missing file. Signed-off-by: Paul Brook --- make_device_config.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make_device_config.sh b/make_device_config.sh index 59f267b5ef..8abadfef7c 100644 --- a/make_device_config.sh +++ b/make_device_config.sh @@ -18,7 +18,8 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`awk '/^include / {print "'$src_dir'/" $2}' $f` + f=`awk '/^include / {ORS=" " ; print "'$src_dir'/" $2}' $f` + [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done process_includes $src > $dest