lib/scripts/getsettings
changeset 61159 da900891ee06
parent 60531 9cc91b8a6489
child 61293 876e7eae22be
--- 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