dotfiles/.env.loader

35 lines
1.2 KiB
Plaintext
Raw Normal View History

# Common env for all shells.
uname_s="$(uname -s)"
case "${uname_s}" in
Linux*) platform="LINUX" platform_os="LINUX";;
Darwin*) platform="MACOS" platform_os="MACOS";;
CYGWIN*) platform="CYGWIN" platform_os="WINDOWS";;
MINGW*) platform="MINGW" platform_os="WINDOWS";;
MSYS*) platform="MINGW" platform_os="WINDOWS";;
*) platform="UNKNOWN:${uname_s} platform_os="UNKNOWN_OS""
esac
export PLATFORM=$platform
export PLATFORM_OS=$platform_os
2023-06-13 19:45:28 +00:00
os_lower="${platform_os,,}"
test -f "$HOME/dotfiles/${os_lower}/env.platform" && . "$HOME/dotfiles/${os_lower}/env.platform"
2021-02-06 23:04:41 +00:00
test -f "$HOME/.env.common-pre" && . "$HOME/.env.common-pre"
test -f "$HOME/.env.private" && . "$HOME/.env.private"
test -f "$HOME/.env.common-post" && . "$HOME/.env.common-post"
2023-06-13 19:45:28 +00:00
2021-02-06 23:04:41 +00:00
test -f "$HOME/.aliases" && . "$HOME/.aliases"
test -f "$HOME/.aliases.common" && . "$HOME/.aliases.common"
test -f "$HOME/.aliases.private" && . "$HOME/.aliases.private"
2021-03-04 19:33:29 +00:00
if [[ $_MC_SET_ENV_PATH -ne 1 ]]; then
test -d "$HOME/bin" && export PATH=$HOME/bin/:$PATH
2023-06-13 19:45:28 +00:00
#TODO: remove this
2021-03-04 19:33:29 +00:00
test -d "$HOME/.dotfiles/bin" && export PATH=$HOME/.dotfiles/bin/:$PATH
fi
export _MC_SET_ENV_PATH=1
2020-08-09 19:25:35 +00:00