Skip to content

Commit dc77373

Browse files
committed
[update] : Simple prompt
1 parent ba500f4 commit dc77373

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tools/clean.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ _umount() { if mountpoint -q "${1}"; then umount -lf "${1}"; fi; }
9191

9292
# Unmount chroot dir
9393
umount_chroot () {
94-
"${tools_dir}/umount.sh" "${work_dir}"
94+
"${tools_dir}/umount.sh" -d "${work_dir}" -m 3
9595
}
9696

9797
# Usage: getclm <number>
@@ -149,13 +149,8 @@ work_dir="$(realpath "${work_dir}")"
149149
if [[ ! "${noconfirm}" = true ]] && (( "$(find "${work_dir}" -type f 2> /dev/null | wc -l)" != 0 )); then
150150
msg_warn "Forcibly unmount all devices mounted under the following directories and delete them recursively."
151151
msg_warn "${work_dir}"
152-
msg_warn -n "Are you sure you want to continue?"
153-
read -n 1 yesorno
154-
if [[ "${yesorno}" = "y" ]] || [[ "${yesorno}" = "" ]]; then
155-
echo
156-
else
157-
exit 1
158-
fi
152+
echo -e "Press Enter to continue or Ctrl + C to cancel."
153+
read
159154
fi
160155

161156

0 commit comments

Comments
 (0)