#!/bin/bash source_dir () { # BASH_DEBUG=source_dir module_load find debug source_dir passed arguments: $* debug function: source_dir local FILES FILES=$(_find -l "$@") # find function # echo $FILES >&2 [[ $? -ne 0 ]] && return 1 for f in $FILES; do debug sourcing: $f >&2 source "$f" done }