Read personal dev settings from git-ignored local config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
tools/devenv.sh
Normal file
13
tools/devenv.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Personal settings of the dev tools: local/dev.env (git-ignored; template tools/dev.env.example).
|
||||
# Sourced by the shell scripts in tools/; a variable already set in the environment wins over the file.
|
||||
_devenv_load() {
|
||||
local f k v
|
||||
f="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/local/dev.env"
|
||||
[ -f "$f" ] || return 0
|
||||
while IFS='=' read -r k v || [ -n "$k" ]; do
|
||||
case $k in '' | \#*) continue ;; esac
|
||||
[ -n "${!k+x}" ] || export "$k=$v"
|
||||
done <"$f"
|
||||
}
|
||||
_devenv_load
|
||||
unset -f _devenv_load
|
||||
Reference in New Issue
Block a user