Patchwork [02/14] fix scripts/make_device_config.sh

login
register
mail settings
Submitter Gerd Hoffmann
Date Feb. 21, 2013, 9:59 a.m.
Message ID <1361440753-13413-3-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/222230/
State New
Headers show

Comments

Gerd Hoffmann - Feb. 21, 2013, 9:59 a.m.
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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh
index 0778fe2..81fe942 100644
--- a/scripts/make_device_config.sh
+++ b/scripts/make_device_config.sh
@@ -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