Skip to content

Commit 99cb3d1

Browse files
committed
[fix] : Fixed assignment to array
1 parent 1e97d6a commit 99cb3d1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/pkglist.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,12 @@ fi
189189

190190
#-- Read package list --#
191191
# Read the file and remove comments starting with # and add it to the list of packages to install.
192+
_pkglist=()
192193
for _file in "${_loadfilelist[@]}"; do
193194
if [[ -f "${_file}" ]]; then
194195
msg_debug "Loaded package file ${_file}"
195196
#_pkglist=( ${_pkglist[@]} "$(grep -h -v ^'#' ${_file})" )
196-
readarray -t -O "${#_pkglist[@]}" < <(grep -h -v ^'#' "${_file}")
197+
readarray -t -O "${#_pkglist[@]}" _pkglist < <(grep -h -v ^'#' "${_file}")
197198
else
198199
msg_debug "The file was not found ${_file}"
199200
fi
@@ -207,7 +208,7 @@ for_module '_excludefile+=("${module_dir}/{}/packages.${arch}/exclude" "${module
207208
for _file in "${_excludefile[@]}"; do
208209
if [[ -f "${_file}" ]]; then
209210
#_excludelist+=($(grep -h -v ^'#' "${_file}") )
210-
readarray -t -O "${#_excludelist[@]}" < <(grep -h -v ^'#' "${_file}")
211+
readarray -t -O "${#_excludelist[@]}" _excludelist < <(grep -h -v ^'#' "${_file}")
211212
fi
212213
done
213214

0 commit comments

Comments
 (0)