#! /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