fix scripts/make_device_config.sh
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 1 Feb 2013 09:48:34 +0000 (10:48 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Feb 2013 10:53:49 +0000 (11:53 +0100)
Make it handle multiple include statements in a file:

 (1) The printf needs a space so the include files will be separated.
 (2) Also $f can contain multiple failes, so redirection will not work
     and we have to use cat to process all files.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
scripts/make_device_config.sh

index 0778fe2..81fe942 100644 (file)
@@ -18,7 +18,7 @@ process_includes () {
 
 f=$src
 while [ -n "$f" ] ; do
-  f=`tr -d '\r' < $f | awk '/^include / {printf "'$src_dir'/%s", $2}'`
+  f=`cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}'`
   [ $? = 0 ] || exit 1
   all_includes="$all_includes $f"
 done