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