diff --git a/winiso/deploy.fish b/winiso/deploy.fish index 8f4c714e..997cce3b 100755 --- a/winiso/deploy.fish +++ b/winiso/deploy.fish @@ -4,6 +4,7 @@ begin set -l $varName set -l dir (status dirname) source "$dir/lib/choose-disk.fish" + source "$dir/lib/confirm.fish" set $varName (bash -c ". $(string escape $dir)/.env; echo \$$varName" 2> /dev/null) [ ! -z "$$varName" ] @@ -251,6 +252,12 @@ begin chooseDisk WIN_DISK end + echo "Proceeding will cause the disk `$WIN_DISK` to be wiped." + + if ! confirm "Are you sure you want to continue?" "n" + exit 1 + end + sudo shred -vfzn 0 -s 512 "$WIN_DISK" begin diff --git a/winiso/lib/confirm.fish b/winiso/lib/confirm.fish new file mode 100755 index 00000000..f83f5de4 --- /dev/null +++ b/winiso/lib/confirm.fish @@ -0,0 +1,4 @@ +#!/bin/env fish +function confirm -a message default + fish "$(status dirname)/../../lib/modules/partition/confirm.fish" $argv +end