From ba314df4906102ee1ac218d345d8f81f8129c8f1 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 25 Jul 2017 15:05:21 +0000 Subject: [PATCH] python-tools.mk: Fix __init__.py generation Signed-off-by: Jan Lindemann --- scripts/python-tools.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/python-tools.sh b/scripts/python-tools.sh index 26d2a042..079b829a 100644 --- a/scripts/python-tools.sh +++ b/scripts/python-tools.sh @@ -12,7 +12,9 @@ usage() cmd_create_init() { - local f files base extracted module_path + local e f files base extracted module_path + local del="-------------------------- generated by $myname" + echo "# >> $del >>" files="$*" for f in $files; do base=${f##*/} @@ -25,11 +27,13 @@ cmd_create_init() if [ "$sed_extract_command" ]; then #echo running $sed_extract_command on $f extracted=`sed "$sed_extract_command" $f` - if [ "$extracted" ]; then - echo "from $module_path import $extracted" - fi + #extracted="$sed_extract_command" + for e in $extracted; do + echo "from $module_path import $e" + done fi done + echo "# << $del <<" } # --------------------- here we go