mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 09:48:01 +00:00
23 lines
835 B
Bash
Executable File
23 lines
835 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Load our configuration files
|
|
# Copyright (c) 2023 Ismo Vuorinen. All Rights Reserved.
|
|
|
|
: "${DOTFILES:=$HOME/.dotfiles}"
|
|
|
|
# Load the shell dotfiles, and then some:
|
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
|
HOST="$(hostname -s)"
|
|
# global (exports|alias|functions) file for all hosts
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file" ] && source "$file"
|
|
# global secret file, git ignored
|
|
# shellcheck source=../config/exports-secret
|
|
[ -r "$file-secret" ] && source "$file-secret"
|
|
# host specific (exports|alias|functions) file
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
|
# host specific (exports|alias|functions) file, git ignored
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
|
done
|