fall back für ROOT_DIR based on the current directory in file system

rapp/pick-what-you-like
Robert Rapp 2025-02-26 12:48:56 +01:00
parent 42b71394df
commit e981a365cc
1 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,13 @@
# 🚀 Script to Generate Secure Secrets for Deployment # 🚀 Script to Generate Secure Secrets for Deployment
# Define root directory relative to the script location # Define root directory relative to the script location
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
# Stelle sicher, dass ROOT_DIR gesetzt ist
if [ -z "$ROOT_DIR" ]; then
echo "❌ WARN: ROOT_DIR ist nicht gesetzt! Setze ROOT_DIR..."
source ./set-project-root.sh
fi
SECRET_FILE="$ROOT_DIR/env/secrets.env" SECRET_FILE="$ROOT_DIR/env/secrets.env"
GITIGNORE_FILE="$ROOT_DIR/.gitignore" GITIGNORE_FILE="$ROOT_DIR/.gitignore"