#!/bin/sh set -eu ENV_FILE="/usr/share/nginx/html/.env" OUTPUT_FILE="/usr/share/nginx/html/env.js" api_base_url="" if [ -f "$ENV_FILE" ]; then api_base_url="$(grep '^VITE_API_BASE_URL=' "$ENV_FILE" | tail -n 1 | cut -d '=' -f 2- || true)" fi cat >"$OUTPUT_FILE" <