diff --git a/lxc1/p0-infrastructure/02_deploy_minio_buckets.sh b/lxc1/p0-infrastructure/02_deploy_minio_buckets.sh index 7d929ad..0859ea4 100644 --- a/lxc1/p0-infrastructure/02_deploy_minio_buckets.sh +++ b/lxc1/p0-infrastructure/02_deploy_minio_buckets.sh @@ -4,7 +4,14 @@ ENV_PATH="/docker/minio/.env" if [ -f "$ENV_PATH" ]; then - export $(grep -v '^#' "$ENV_PATH" | xargs) + while read -r line || [ -n "$line" ]; do + # Skip comments and empty lines + [[ "$line" =~ ^#.*$ ]] && continue + [[ -z "$line" ]] && continue + + # Export the variable, removing any literal quotes + export "${line//\"/}" + done < "$ENV_PATH" echo "Successfully loaded variables from $ENV_PATH" else echo "ERROR: Could not find .env at $ENV_PATH"