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