sh/bash.d/main.sh

15 lines
262 B
Bash
Raw Normal View History

2023-05-09 20:09:01 +00:00
#! /usr/bin/env bash
2023-05-09 20:58:36 +00:00
FILE="$(realpath "${BASH_SOURCE[0]}")"
ROOT="$(dirname "${FILE}")"
2023-05-09 20:09:01 +00:00
2023-05-09 20:15:40 +00:00
function main {
local module
for module in "${ROOT}"/*.sh ; do
2023-05-09 20:58:36 +00:00
if [ "${module}" != "${FILE}" ] ; then
2023-05-09 20:15:40 +00:00
source "${module}"
fi
done
}
2023-05-09 20:09:01 +00:00
2023-05-09 20:15:40 +00:00
main