29 lines
932 B
Bash
Executable File
29 lines
932 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Load Ordrestyring Environment Variables
|
|
# Source this file to load all environment variables
|
|
#
|
|
|
|
# Determine script directory and workspace root
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ENV_FILE="$SCRIPT_DIR/.env.ordrestyring"
|
|
|
|
# Check if .env.ordrestyring exists in workspace root
|
|
if [ -f "$ENV_FILE" ]; then
|
|
# Only print debug info if not being sourced silently
|
|
if [ -z "$SILENT_LOAD" ]; then
|
|
echo "Loading Ordrestyring environment variables from $ENV_FILE..." >&2
|
|
fi
|
|
export $(grep -v '^#' "$ENV_FILE" | xargs)
|
|
if [ -z "$SILENT_LOAD" ]; then
|
|
echo "Environment variables loaded:" >&2
|
|
echo " ORDRESTYRING_TOKEN: ${ORDRESTYRING_TOKEN:0:5}***" >&2
|
|
echo " DB_HOST: $DB_HOST" >&2
|
|
echo " DB_USER: $DB_USER" >&2
|
|
echo " DB_NAME: $DB_NAME" >&2
|
|
fi
|
|
else
|
|
echo "❌ .env.ordrestyring file not found at $ENV_FILE"
|
|
exit 1
|
|
fi
|