Skip to content

Commit 023e621

Browse files
committed
[fix] : Minor fix
1 parent b82866f commit 023e621

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,9 @@ _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
201-
if [[ ! "${_mount}" = "$(realpath ${work_dir})/${arch}/airootfs" ]]; then
202-
msg_info "Unmounting ${_mount}"
203-
_umount "${_mount}" 2> /dev/null
204-
fi
200+
for _mount in $(cat /proc/mounts | getclm 2 | grep "$(realpath ${work_dir})" | tac | grep -xv "$(realpath ${work_dir})/${arch}/airootfs"); do
201+
msg_info "Unmounting ${_mount}"
202+
_umount "${_mount}" 2> /dev/null
205203
done
206204
}
207205

@@ -1086,7 +1084,7 @@ eval set -- "${OPT}"
10861084
msg_debug "Argument: ${OPT}"
10871085
unset OPT OPTS OPTL
10881086

1089-
while :; do
1087+
while true; do
10901088
case "${1}" in
10911089
-a | --arch)
10921090
arch="${2}"

0 commit comments

Comments
 (0)