lib/scripts/getsettings
changeset 61159 da900891ee06
parent 60531 9cc91b8a6489
child 61293 876e7eae22be
     1.1 --- a/lib/scripts/getsettings	Fri Sep 11 17:57:34 2015 +0200
     1.2 +++ b/lib/scripts/getsettings	Fri Sep 11 14:53:05 2015 +0200
     1.3 @@ -240,21 +240,29 @@
     1.4  {
     1.5    local BASE="$1"
     1.6    local CATALOG="$2"
     1.7 +  local COMPONENT=""
     1.8 +  local -a COMPONENTS=()
     1.9  
    1.10    if [ ! -f "$CATALOG" ]; then
    1.11      echo >&2 "Bad component catalog file: \"$CATALOG\""
    1.12      exit 2
    1.13    fi
    1.14 +
    1.15    {
    1.16      while { unset REPLY; read -r; test "$?" = 0 -o -n "$REPLY"; }
    1.17      do
    1.18        case "$REPLY" in
    1.19          \#* | "") ;;
    1.20 -        /*) init_component "$REPLY" ;;
    1.21 -        *) init_component "$BASE/$REPLY" ;;
    1.22 +        /*) COMPONENTS["${#COMPONENTS[@]}"]="$REPLY" ;;
    1.23 +        *) COMPONENTS["${#COMPONENTS[@]}"]="$BASE/$REPLY" ;;
    1.24        esac
    1.25      done
    1.26    } < "$CATALOG"
    1.27 +
    1.28 +  for COMPONENT in "${COMPONENTS[@]}"
    1.29 +  do
    1.30 +    init_component "$COMPONENT"
    1.31 +  done
    1.32  }
    1.33  
    1.34  #main components