浏览代码

Multi-profile support

bryan 2 年之前
父节点
当前提交
8ce8ea92fe
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      openwrtbuilder

+ 1 - 3
openwrtbuilder

@@ -610,15 +610,13 @@ main() {
     for profile in "${PROFILES[@]}"; do
     for profile in "${PROFILES[@]}"; do
 
 
         debug "Profile: $profile"
         debug "Profile: $profile"
-        loadProfiles
 
 
         [[ ! ${!profile@a} = A ]] && echo "Profile does not exist" && return 1
         [[ ! ${!profile@a} = A ]] && echo "Profile does not exist" && return 1
 
 
         debug "r4s: ${r4s[*]}"
         debug "r4s: ${r4s[*]}"
 
 
-        declare -gn P_ARR="$profile"
+        declare -gn P_ARR="${PROFILES[$profile}"
 
 
-        debug
         debug "P_ARR: ${P_ARR[*]}"
         debug "P_ARR: ${P_ARR[*]}"
 
 
         : "${BUILDDIR:=$SCRIPTDIR}"
         : "${BUILDDIR:=$SCRIPTDIR}"