mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
22 lines
760 B
Bash
22 lines
760 B
Bash
# this is my bashrc config. there are many like it, but this one is mine.
|
|
# shellcheck shell=bash
|
|
|
|
# Defaults
|
|
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
|
|
}
|
|
x-load-configs
|
|
|
|
# Import ssh keys in keychain
|
|
ssh-add -A 2>/dev/null;
|