Skip to content

Commit 84ad8a1

Browse files
committed
[fix] : Fixed SC2046
1 parent af7f455 commit 84ad8a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ _mount() { if ! mountpoint -q "${2}" && [[ -f "${1}" ]] && [[ -d "${2}" ]]; then
197197
# Unmount chroot dir
198198
umount_chroot () {
199199
local _mount
200-
for _mount in $(cat /proc/mounts | getclm 2 | grep $(realpath ${work_dir}) | tac); do
200+
for _mount in $(cat /proc/mounts | getclm 2 | grep "$(realpath ${work_dir})" | tac); do
201201
if [[ ! "${_mount}" = "$(realpath ${work_dir})/${arch}/airootfs" ]]; then
202202
msg_info "Unmounting ${_mount}"
203203
_umount "${_mount}" 2> /dev/null
@@ -348,7 +348,7 @@ prepare_env() {
348348
local _check_failed=false _pkg _result=0
349349
msg_info "Checking dependencies ..."
350350
for _pkg in "${dependence[@]}"; do
351-
eval "${tools_dir}/package.py" "${_pkg}" $( [[ "${debug}" = false ]] && echo "> /dev/null") || _result="${?}"
351+
eval "${tools_dir}/package.py" "${_pkg}" "$( [[ "${debug}" = false ]] && echo "> /dev/null")" || _result="${?}"
352352
case "${_result}" in
353353
"3")
354354
_check_failed=true
@@ -376,15 +376,15 @@ prepare_env() {
376376
if [[ -n $(ls -a "${work_dir}" 2> /dev/null | grep -xv ".." | grep -xv ".") ]] && [[ "${normwork}" = false ]]; then
377377
umount_chroot_advance
378378
msg_info "Deleting the contents of ${work_dir}..."
379-
"${tools_dir}/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
379+
"${tools_dir}/clean.sh" -o -w "$(realpath "${work_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
380380
fi
381381

382382
# 強制終了時に作業ディレクトリを削除する
383383
local _trap_remove_work
384384
_trap_remove_work() {
385385
local status=${?}
386386
if [[ "${normwork}" = false ]]; then
387-
echo; "${tools_dir}/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
387+
echo; "${tools_dir}/clean.sh" -o -w "$(realpath "${work_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
388388
fi
389389
exit ${status}
390390
}
@@ -1300,7 +1300,7 @@ if [[ -d "${channel_dir}.add" ]]; then
13001300
channel_name="${1}"
13011301
channel_dir="${channel_dir}.add"
13021302
elif [[ "${channel_name}" = "clean" ]]; then
1303-
"${tools_dir}/clean.sh" -w "$(realpath "${work_dir}")" $([[ "${debug}" = true ]] && echo -n "-d")
1303+
"${tools_dir}/clean.sh" -w "$(realpath "${work_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
13041304
exit 0
13051305
fi
13061306

@@ -1346,6 +1346,6 @@ if [[ "${noiso}" = false ]]; then
13461346
run_once make_iso
13471347
fi
13481348

1349-
[[ "${cleaning}" = true ]] && "${tools_dir}/clean.sh" -o -w "$(realpath "${work_dir}")" $([[ "${debug}" = true ]] && echo -n "-d")
1349+
[[ "${cleaning}" = true ]] && "${tools_dir}/clean.sh" -o -w "$(realpath "${work_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
13501350

13511351
exit 0

0 commit comments

Comments
 (0)