Skip to content

Commit

Permalink
move confirmation before all write operations
Browse files Browse the repository at this point in the history
  • Loading branch information
yaperez-anssi committed Feb 27, 2020
1 parent f6ed085 commit e378147
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/create-chipsec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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"
Expand Down

0 comments on commit e378147

Please sign in to comment.