diff --git a/bash.d/main.sh b/bash.d/main.sh index 8fa3fe2..732bad3 100644 --- a/bash.d/main.sh +++ b/bash.d/main.sh @@ -2,8 +2,13 @@ PATH="$(realpath "${BASH_SOURCE[0]}")" ROOT="$(dirname "${PATH}")" -DIRECTORY="${ROOT}/bash.d" +function main { +local module + for module in "${ROOT}"/*.sh ; do + if [ "${module}" != "${PATH}" ] ; then + source "${module}" + fi + done +} -for file in "${DIRECTORY}"/*.sh ; do - source "${file}" -done +main