source directly

This commit is contained in:
Marc Beninca 2023-05-09 22:15:40 +02:00
parent 247b6a7fed
commit 98056f2fb6

View file

@ -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