forked from Qortal/q-blog
14 lines
312 B
Bash
Executable File
14 lines
312 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Usage: bash scripts/tracker/with_env.sh .gitea.env <command> [args...]
|
|
set -euo pipefail
|
|
ENV_FILE="${1:-.gitea.env}"; shift || true
|
|
if [[ ! -f "$ENV_FILE" ]]; then
|
|
echo "Env file not found: $ENV_FILE" >&2
|
|
exit 1
|
|
fi
|
|
set -a
|
|
# shellcheck disable=SC1090
|
|
source "$ENV_FILE"
|
|
set +a
|
|
exec "$@"
|