diff --git a/Bash/header b/Bash/header index 8306a4f..4fdc4d2 100644 --- a/Bash/header +++ b/Bash/header @@ -214,6 +214,15 @@ done return 0; } +# Confirm a user wants to do the thing. +function confirmUser() { + infoheader WARNING: "$1" + read -p 'Are you sure? [yes/NO]' answer + if [ "${answer,,}" != 'yes' ]; then + exit 1 + fi +} + ## Torrenting functions ## # Configure the torrenting engine. function configuretorrent {