sh/bash/main.sh

21 lines
415 B
Bash
Raw Normal View History

2023-05-09 20:09:01 +00:00
#! /usr/bin/env bash
2023-05-12 21:38:42 +00:00
MAIN_FILE="$(realpath "${BASH_SOURCE[0]}")"
MAIN_ROOT="$(dirname "${MAIN_FILE}")"
function link_bashrc {
local file='/etc/bash.bashrc'
rm --force "${file}"
ln --symbolic "${MAIN_FILE}" "${file}"
}
2023-05-09 20:09:01 +00:00
2023-05-09 20:15:40 +00:00
function main {
local module
2023-05-12 21:38:42 +00:00
for module in "${MAIN_ROOT}"/*.sh ; do
if [ "${module}" != "${MAIN_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