Skip to content

Commit 91ac0fa

Browse files
committed
[update] : Use array
1 parent 4b65949 commit 91ac0fa

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

build.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,9 @@ load_config() {
224224

225225
# Display channel list
226226
show_channel_list() {
227-
if [[ "${nochkver}" = true ]]; then
228-
bash "${tools_dir}/channel.sh" -v "${alteriso_version}" -n show
229-
else
230-
bash "${tools_dir}/channel.sh" -v "${alteriso_version}" show
231-
fi
227+
local _args=("-v" "${alteriso_version}" show)
228+
[[ "${nochkver}" = true ]] && _args+=("-n")
229+
bash "${tools_dir}/channel.sh" "${_args[@]}"
232230
}
233231

234232
# Execute command for each module. It will be executed with {} replaced with the module name.
@@ -241,11 +239,9 @@ for_module(){
241239
# pacstrapを実行
242240
_pacstrap(){
243241
msg_info "Installing packages to ${airootfs_dir}/'..."
244-
if [[ "${pacman_debug}" = true ]]; then
245-
pacstrap -C "${build_dir}/pacman.conf" -c -G -M -- "${airootfs_dir}" --debug "${@}"
246-
else
247-
pacstrap -C "${build_dir}/pacman.conf" -c -G -M -- "${airootfs_dir}" "${@}"
248-
fi
242+
local _args=("-c" "-G" "-M" "--" "${airootfs_dir}" "${@}")
243+
[[ "${pacman_debug}" = true ]] && _args+=(--debug)
244+
pacstrap -C "${build_dir}/pacman.conf" "${_args[@]}"
249245
msg_info "Packages installed successfully!"
250246
}
251247

0 commit comments

Comments
 (0)