more robust init_components: test run of polyml executable on windows appears to disrupt stdin stream of cygwin;
authorwenzelm
Fri, 11 Sep 2015 14:53:05 +0200
changeset 61159 da900891ee06
parent 61158 ea6a4c8bc722
child 61160 12a72ca8329d
more robust init_components: test run of polyml executable on windows appears to disrupt stdin stream of cygwin;
lib/scripts/getsettings
--- a/lib/scripts/getsettings	Fri Sep 11 17:57:34 2015 +0200
+++ b/lib/scripts/getsettings	Fri Sep 11 14:53:05 2015 +0200
@@ -240,21 +240,29 @@
 {
   local BASE="$1"
   local CATALOG="$2"
+  local COMPONENT=""
+  local -a COMPONENTS=()
 
   if [ ! -f "$CATALOG" ]; then
     echo >&2 "Bad component catalog file: \"$CATALOG\""
     exit 2
   fi
+
   {
     while { unset REPLY; read -r; test "$?" = 0 -o -n "$REPLY"; }
     do
       case "$REPLY" in
         \#* | "") ;;
-        /*) init_component "$REPLY" ;;
-        *) init_component "$BASE/$REPLY" ;;
+        /*) COMPONENTS["${#COMPONENTS[@]}"]="$REPLY" ;;
+        *) COMPONENTS["${#COMPONENTS[@]}"]="$BASE/$REPLY" ;;
       esac
     done
   } < "$CATALOG"
+
+  for COMPONENT in "${COMPONENTS[@]}"
+  do
+    init_component "$COMPONENT"
+  done
 }
 
 #main components