From e3781474e58168a70f6f75350cb0280ad8aaa36c Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Thu, 27 Feb 2020 10:27:08 +0100 Subject: [PATCH] move confirmation before all write operations --- tools/create-chipsec.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/create-chipsec.sh b/tools/create-chipsec.sh index 125feba..89f458b 100755 --- a/tools/create-chipsec.sh +++ b/tools/create-chipsec.sh @@ -167,6 +167,10 @@ main () { exit 1 fi trap cleanup ERR + + printf "Use ${1}? It will be completely erased (Y/n) " + exit_if_no "$(ask_confirm "Y")" + if [ -b "${arg}" ]; #block device, just use it directly then disk=${arg} @@ -183,9 +187,6 @@ main () { mount_point=$(mktemp -d -p "" efiliveXXX) - printf "Use ${disk}? (Y/n) " - exit_if_no "$(ask_confirm "Y")" - part_disk "${disk}" boot="${disk}${sep}1"