File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -173,19 +173,9 @@ _mount() { ! mountpoint -q "${2}" && [[ -f "${1}" ]] && [[ -d "${2}" ]] && mount
173173
174174# Unmount work dir
175175umount_work () {
176- local _mount
177- if [[ ! -v " build_dir" ]] || [[ " ${build_dir} " = " " ]]; then
178- msg_error " Exception error about working directory" 1
179- fi
180- [[ ! -d " ${build_dir} " ]] && return 0
181- for _mount in $( find " ${build_dir} " -mindepth 1 -type d -printf " %p\0" | xargs -0 -I{} bash -c " mountpoint -q {} && echo {}" | tac) ; do
182- if echo " ${_mount} " | grep " ${work_dir} " > /dev/null 2>&1 || echo " ${_mount} " | grep " ${script_path} " > /dev/null 2>&1 || echo " ${_mount} " | grep " ${out_dir} " > /dev/null 2>&1 ; then
183- msg_info " Unmounting ${_mount} "
184- _umount " ${_mount} " 2> /dev/null
185- else
186- msg_error " It is dangerous to unmount a directory that is not managed by the script."
187- fi
188- done
176+ local _args=(" ${build_dir} " )
177+ [[ " ${debug} " = true ]] && _args=(" -d" " ${_args[@]} " )
178+ " ${tools_dir} /umount.sh" " ${_args[@]} "
189179}
190180
191181# Mount airootfs on "${airootfs_dir}"
You can’t perform that action at this time.
0 commit comments