prompt user if they want to continue
This commit is contained in:
parent
14366c7eac
commit
72054dd06b
1 changed files with 10 additions and 6 deletions
|
@ -94,13 +94,17 @@ while :; do
|
|||
done
|
||||
stty echo
|
||||
|
||||
# user confirmation
|
||||
while :; do
|
||||
printf "\nThis script is descructive."
|
||||
prompt confirmed "" "Are you sure you want to contiue." YES NO
|
||||
[[ "${confirmed?}" == "YES" ]] && break
|
||||
[[ "${confirmed?}" == "NO" ]] && {
|
||||
printf "Exiting script\n"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
## Format disk(s)
|
||||
mkfs.fat -F 32 "$root_dev"1
|
||||
mkfs.btrfs -f "$root_dev"2
|
||||
[[ "${home_fmt:-0}" -eq 1 ]] && {
|
||||
mkfs.btrfs -f "$home_dev"1
|
||||
}
|
||||
|
||||
## Configure root btrfs
|
||||
mount --mkdir "$root_dev"2 /mnt
|
||||
|
|
Loading…
Reference in a new issue