load_machine_config() { directory="$1" path="${HOME}/${directory}/$(hostname).sh" # shellcheck source=/dev/null [ -x "$path" ] && . "$path" unset directory unset path } load_config_directory() { directory="$1" path="${HOME}/${directory}" if [ -d "${path}" ]; then for f in "${path}/"?*.sh; do # shellcheck source=/dev/null [ -x "$f" ] && . "$f" done unset f fi }