sh/bash/main.sh
2023-05-14 13:59:46 +02:00

20 lines
445 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_import_modules {
local module
for module in "${MAIN_ROOT}"/*.sh ; do
if [ "${module}" != "${MAIN_FILE}" ] ; then
source "${module}"
fi
done
}
main_import_modules