From 68bb45e1d2ee0bda94aa82ec87860a802e8a800d Mon Sep 17 00:00:00 2001 From: m3tam3re Date: Thu, 3 Apr 2025 09:36:18 +0200 Subject: [PATCH] +version file --- starter/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/starter/install.sh b/starter/install.sh index 099d955..23411a4 100755 --- a/starter/install.sh +++ b/starter/install.sh @@ -20,8 +20,11 @@ fi setup_from_template() { local TEMPLATE=starter local DIR_NAME="self-host-playbook" + local CURRENT_DIR=$(basename "$PWD") - if [ -d "$DIR_NAME" ]; then + if [ "$CURRENT_DIR" = "$DIR_NAME" ]; then + echo "📂 Already in $DIR_NAME directory, continuing..." + elif [ -d "$DIR_NAME" ]; then echo "📂 Directory '$DIR_NAME' already exists" read -p "Do you want to proceed in the existing directory? (y/N) " -n 1 -r echo