Read personal dev settings from git-ignored local config

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 13:23:58 +03:00
parent b077388b74
commit 2f38d27b3f
13 changed files with 115 additions and 26 deletions

13
tools/devenv.sh Normal file
View 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