.bashrc is back to its one job: export the Panama paths and source what it finds. The personal-env block moves into config/bash/shell — first, because the tmux guard below it reads that file — and the cargo source that was duplicated between the two files lives only in shell now. The real fix is behind that tidying: both Home Assistant helpers defaulted to the IN-REPO config/bash/env, and the writer rebuilt it with only its own three lines — which read as "my env vars vanished" to the person who thought that file was hand-maintained. Both now prefer ~/.config/panama/env, the migrated home outside the checkout, with the repo path kept only as a read fallback for unmigrated machines. The stale legacy copy on this machine is retired; the working credentials were merged into the migrated file first, after probing both sets against the live Home Assistant. Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
27 lines
515 B
Bash
27 lines
515 B
Bash
#!/usr/bin/env bash
|
|
export PANAMA_PATH="$HOME/.local/share/Panama"
|
|
export PANAMA_BASH="$PANAMA_PATH/config/bash"
|
|
|
|
[ -f /etc/bashrc ] && . /etc/bashrc
|
|
|
|
if [ -d ~/.bashrc.d ]; then
|
|
for rc in ~/.bashrc.d/*; do
|
|
if [ -f "$rc" ]; then
|
|
. "$rc"
|
|
fi
|
|
done
|
|
unset rc
|
|
fi
|
|
|
|
if [ -d "$PANAMA_BASH" ]; then
|
|
for f in "$PANAMA_BASH"/*; do
|
|
[ -f "$f" ] && . "$f"
|
|
done
|
|
unset f
|
|
else
|
|
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
|
|
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
|
fi
|
|
export PATH
|
|
fi
|