Browse Source

Revert package array

bryan 2 years ago
parent
commit
f1f7fca41e
1 changed files with 5 additions and 5 deletions
  1. 5 5
      openwrtbuilder

+ 5 - 5
openwrtbuilder

@@ -450,7 +450,7 @@ makeImages() {
     make image \
         BIN_DIR="$BINDIR" \
         PROFILE="$PROFILE" \
-        PACKAGES="${PACKAGES[*]}" \
+        PACKAGES="$PACKAGES" \
         FILES="${FILESDIR}" \
         --directory="$BUILDDIR" \
         --jobs="$(nproc)"  \
@@ -593,7 +593,7 @@ fromSource() {
     config_opts+=("CONFIG_BINARY_FOLDER=\"$BINDIR\"")
 
     # Add custom packages
-    for pkg in "${PACKAGES[@]}"; do
+    for pkg in $PACKAGES; do
         if [[ $pkg == -* ]]; then
             config_opts+=("CONFIG_PACKAGE_${pkg#-}=n") # remove package
         else
@@ -758,7 +758,7 @@ main() {
         declare -g FILESYSTEM="${P_ARR[filesystem]:="squashfs"}"
         declare -g TARGET="${P_ARR[target]}"
         declare -g PROFILE="${P_ARR[profile]}"
-        IFS=" " read -r -a PACKAGES <<< "${P_ARR[packages]:-}"
+        declare -g PACKAGES="${P_ARR[packages]:-}"
 
         if (( RESET )); then
             askOk "Remove $BUILDDIR and $BINDIR?" || exit $?
@@ -796,7 +796,7 @@ main() {
             for x in "${!P_ARR[@]}"; do printf "%s=%s\n" "$x" "${P_ARR[$x]}"; done
             echo "Build settings:"
             cat <<- EOF
-				ALIAS (\$profile, \$P_ARR -- should match)=$profile, $P_ARR
+				ALIAS (\$profile, \$P_ARR -- should match)=$profile, ${!P_ARR}
 				BUILDROOT=$BUILDROOT
 				BUILDDIR=$BUILDDIR
 				BINDIR=$BINDIR
@@ -805,7 +805,7 @@ main() {
 				RELEASE=$RELEASE
 				FILESYSTEM=$FILESYSTEM
 				SYSUPGRADEIMGGZ=$SYSUPGRADEIMGGZ
-                ib_url=$ib_url
+				ib_url=$ib_url
 			EOF
         fi