From 265d1b6b8253411bed66a79a32647d7337fd3da9 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Wed, 14 Jan 2026 13:51:39 -0600 Subject: [PATCH] Adding confirmUser function --- Bash/header | 9 +++++++++ 1 file changed, 9 insertions(+) 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 {