1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2025-06-18 05:06:38 +02:00

Use XDG_DOTFILES_DIR to find the dotfiles directory

This commit is contained in:
Eric-Teunis de Boone 2020-03-07 01:49:13 +01:00
parent a1e0f231eb
commit 5fb588478a
3 changed files with 20 additions and 15 deletions

View file

@ -1,11 +1,11 @@
# Define DOTFILES for easy access
DOTFILES="$HOME/.dotfiles"
# Define XDG_DOTFILES_DIR for easy access
export XDG_DOTFILES_DIR="$HOME/.dotfiles"
# Source main profile
[ -r "$DOTFILES/profiles/main.sh" ] && source "$DOTFILES/profiles/main.sh"
[ -r "$XDG_DOTFILES_DIR/profiles/main.sh" ] && source "$XDG_DOTFILES_DIR/profiles/main.sh"
# Source machine specific profile
[ -r "$DOTFILES/profiles/$HOSTNAME.profile" ] && source "$DOTFILES/profiles/$HOSTNAME.profile"
[ -r "$XDG_DOTFILES_DIR/profiles/$HOSTNAME.profile" ] && source "$XDG_DOTFILES_DIR/profiles/$HOSTNAME.profile"
# Always source a local profile
[ -r "$HOME/.profile.local" ] && source "$HOME/.profile.local"