sh/bash/main.sh
2023-05-12 23:38:42 +02:00

20 lines
415 B
Bash

#! /usr/bin/env bash
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}"
}
function main {
local module
for module in "${MAIN_ROOT}"/*.sh ; do
if [ "${module}" != "${MAIN_FILE}" ] ; then
source "${module}"
fi
done
}
main