feat(bashrc): add global bashrc stuff

Next, I'll import host-specifics then later this afternoon.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2023-01-06 01:22:50 +08:00
parent ec76f58b37
commit b0ee16d81f
No known key found for this signature in database
GPG key ID: 67BFC91B3DA12BE8
6 changed files with 144 additions and 0 deletions

21
.bash_login Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
export HOST_SPECIFIC_BASHRC_PATH="$HOME/.config/$HOSTNAME.bashrc"
# Stage 0: Source dotenv stuff from homedir
source "$HOME/.env"
if [[ -f "$HOME/.env.local" ]]; then
source "$HOME/.env.local"
export LOCAL_DOTENV_LOADED=true
fi
# Stage 1: Load global bashrc
if [[ -f "$HOME/.bashrc" ]]; then
source "$HOME/.bashrc"
fi
# Stage 2: Machine specifcs
if [[ -f $HOST_SPECIFIC_BASHRC ]]; then
source "$HOST_SPECIFIC_BASHRC_PATH"
export HOST_SPECIFIC_BASHRC_LOADED=true
fi