2023-01-24 20:52:40 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-01-24 20:31:32 -08:00
|
|
|
### Source .bashrc if it is present
|
|
|
|
if [ -f "$HOME/.bashrc" ]; then
|
|
|
|
. "$HOME/.bashrc"
|
2023-08-07 22:29:21 -07:00
|
|
|
elif [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/exports.sh" ]; then
|
|
|
|
. "${XDG_CONFIG_HOME:-$HOME/.config}/shell/exports.sh"
|
2023-01-24 20:31:32 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
### XDG
|
2023-08-07 22:29:21 -07:00
|
|
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
|
|
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
|
|
|
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
2023-01-24 20:31:32 -08:00
|
|
|
|
|
|
|
### Ensure Homebrew PATHs
|
2023-01-24 20:59:29 -08:00
|
|
|
if [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then
|
2023-01-24 20:31:32 -08:00
|
|
|
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
|
|
|
|
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
|
|
|
|
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
|
|
|
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}"
|
|
|
|
export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:"
|
|
|
|
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}"
|
|
|
|
export WHALEBREW_INSTALL_PATH="/home/linuxbrew/.linuxbrew/whalebrew"
|
2023-01-24 20:59:29 -08:00
|
|
|
elif [ -f "/usr/local/bin/brew" ]; then
|
2023-01-24 20:31:32 -08:00
|
|
|
eval "$(/usr/local/bin/brew shellenv)"
|
2023-12-05 10:07:50 -08:00
|
|
|
elif [ -f "${HOMEBREW_PREFIX:-/opt/homebrew}/bin/brew" ]; then
|
|
|
|
eval "$("${HOMEBREW_PREFIX:-/opt/homebrew}/bin/brew" shellenv)"
|
2023-01-24 20:31:32 -08:00
|
|
|
fi
|
2023-07-10 22:05:07 -07:00
|
|
|
export HOMEBREW_NO_ANALYTICS=1
|
2023-01-24 20:31:32 -08:00
|
|
|
|
2023-02-01 18:15:14 -08:00
|
|
|
### SDKMan
|
2023-08-07 22:29:21 -07:00
|
|
|
export SDKMAN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/sdkman"
|
2023-02-01 18:15:14 -08:00
|
|
|
|
2023-01-30 21:43:15 -08:00
|
|
|
### Volta
|
2023-08-07 22:29:21 -07:00
|
|
|
export VOLTA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/volta"
|
2023-01-30 21:43:15 -08:00
|
|
|
export PATH="$VOLTA_HOME/bin:$PATH"
|
|
|
|
|
2023-01-24 20:31:32 -08:00
|
|
|
### Ensure ~/.local/bin in PATH
|
2023-01-24 20:52:40 -08:00
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
2023-11-04 21:21:27 -07:00
|
|
|
|
|
|
|
### Remove ~/.bash_sessions
|
|
|
|
export HISTFILE="$XDG_STATE_HOME/bash/history"
|