Files
RetroDebian/builder/bash/run_profile_config.sh
2026-03-27 23:11:33 +01:00

22 lines
517 B
Bash

#!/bin/sh
set -eu
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "$SELF_DIR/common.sh"
ENV_FILE=${1:-}
[ -n "$ENV_FILE" ] || fail "Usage: run_profile_config.sh <env-file>"
load_env_file "$ENV_FILE"
[ -n "${LIVE_DIR:-}" ] || fail "LIVE_DIR is required"
mkdir -p "$LIVE_DIR"
if maybe_fake_legacy lh_config; then
mkdir -p "$LIVE_DIR/.fake-live-helper"
printf 'fake lh_config for %s
' "${PROFILE_NAME:-unknown}" > "$LIVE_DIR/.fake-live-helper/lh_config.txt"
exit 0
fi
exec lh_config "$LIVE_DIR"