@@ -197,7 +197,7 @@ _mount() { if ! mountpoint -q "${2}" && [[ -f "${1}" ]] && [[ -d "${2}" ]]; then
197197# Unmount chroot dir
198198umount_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"
13021302elif [[ " ${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
13051305fi
13061306
@@ -1346,6 +1346,6 @@ if [[ "${noiso}" = false ]]; then
13461346 run_once make_iso
13471347fi
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
13511351exit 0
0 commit comments