fix(shell): add missing hostname to config loaders

This commit is contained in:
2023-08-31 09:56:26 +03:00
parent 31e04ce865
commit 51afab44ef
2 changed files with 11 additions and 9 deletions

View File

@@ -7,12 +7,13 @@ export DOTFILES="$HOME/.dotfiles"
# Run x-load-configs in your terminal to reload the files.
function x-load-configs()
{
HOST="$(hostname -s)"
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
[ -r "$file-$HOST" ] && source "$file-$HOST"
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
done
}
x-load-configs

View File

@@ -9,13 +9,14 @@ export DOTFILES="$HOME/.dotfiles"
# Run x-load-configs in your terminal to reload the files.
function x-load-configs()
{
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file"
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
done
HOST="$(hostname -s)"
# Load the shell dotfiles, and then some:
for file in $DOTFILES/config/{exports,alias,functions}; do
[ -r "$file" ] && source "$file"
[ -r "$file-secret" ] && source "$file-secret"
[ -r "$file-$HOST" ] && source "$file-$HOST"
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
done
}
x-load-configs