From cacb3e3bf1f9032a23afd6b89dbeb613b4e27121 Mon Sep 17 00:00:00 2001 From: Julian lechner Date: Fri, 18 Sep 2026 10:27:41 +0200 Subject: [PATCH] feat(uninstall): accept y/N confirmation in bash script Co-Authored-By: Claude Sonnet 5 --- scripts/uninstall.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 1807a67..bcc96b0 100644 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -42,11 +42,14 @@ if [ "$dry_run" = false ] && [ "$force" = false ]; then fi printf 'This removes the managed configuration, extensions, and semantic retrieval setup for %s under %s.\n' "$client" "$home_path" printf 'Backups already on disk are kept; anything this setup never installed is left untouched.\n' - read -r -p "Type 'yes' to continue: " confirm || confirm="" - if [ "$confirm" != yes ]; then - printf 'Cancelled, nothing was removed.\n' - exit 1 - fi + read -r -p "Continue? [y/N]: " confirm || confirm="" + case "$confirm" in + [Yy]|[Yy][Ee][Ss]) ;; + *) + printf 'Cancelled, nothing was removed.\n' + exit 1 + ;; + esac fi stamp=$(date +%Y%m%d-%H%M%S)