Skip to content

Commit a34a919

Browse files
committed
[update] : Sort before exclusion
1 parent 1f0216b commit a34a919

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/pkglist.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ if (( "${#additional_exclude_pkg[@]}" >= 1 )); then
219219
msg_debug "Additional excluded packages: ${additional_exclude_pkg[*]}"
220220
fi
221221

222+
223+
#-- パッケージリストをソートし重複を削除 --#
224+
_pkglist=($(printf "%s\n" "${_pkglist[@]}" | sort | uniq | tr "\n" " "))
225+
222226
#-- excludeに記述されたパッケージを除外 --#
223227
# _pkglistを_subpkglistにコピーしexcludeのパッケージを除外し再代入
224228
_subpkglist=(${_pkglist[@]})
@@ -239,8 +243,6 @@ else
239243
msg_debug "No packages are excluded."
240244
fi
241245

242-
# パッケージリストをソートし重複を削除
243-
_pkglist=($(printf "%s\n" "${_pkglist[@]}" | sort | uniq | tr "\n" " "))
244246

245247
OLD_IFS="${IFS}"
246248
if [[ "${line}" = true ]]; then

0 commit comments

Comments
 (0)