diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-10 17:42:56 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-10 17:42:56 -0400 |
| commit | 69809346b7c5c710eca080e5390244be53dc2732 (patch) | |
| tree | 4fdb6a63437ddd9d27eef5ddfb2cb8c2613dcb89 /scripts/lib/env.sh | |
| parent | Install shadow-uidmap instead of shadow (diff) | |
| download | cli-69809346b7c5c710eca080e5390244be53dc2732.zip | |
Replace tools with scripts and use them in .build.yml
Diffstat (limited to 'scripts/lib/env.sh')
| -rw-r--r-- | scripts/lib/env.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/lib/env.sh b/scripts/lib/env.sh new file mode 100644 index 0000000..e598584 --- /dev/null +++ b/scripts/lib/env.sh @@ -0,0 +1,20 @@ +# shellcheck shell=bash +[[ -n "${BOLT_ENV_LOADED:-}" ]] && return +readonly BOLT_ENV_LOADED=1 + +source "$(dirname "${BASH_SOURCE[0]}")/log.sh" + +load_env_file() { + local -r env_file="$1" + if [[ ! -f "$env_file" ]]; then + log_error "Environment file not found: $env_file" + return 1 + fi + + set -a + # shellcheck disable=SC1090 + source "$env_file" + set +a + + log_info "Loaded environment from $env_file" +} |