#! /usr/bin/env bash FILE="$(realpath "${BASH_SOURCE[0]}")" ROOT="$(dirname "${FILE}")" function main { local module for module in "${ROOT}"/*.sh ; do if [ "${module}" != "${FILE}" ] ; then source "${module}" fi done } main