diff --git a/bash/main.sh b/bash/main.sh index 71452c3..8996b7e 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -1,11 +1,17 @@ #! /usr/bin/env bash -FILE="$(realpath "${BASH_SOURCE[0]}")" -ROOT="$(dirname "${FILE}")" +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 "${ROOT}"/*.sh ; do - if [ "${module}" != "${FILE}" ] ; then + for module in "${MAIN_ROOT}"/*.sh ; do + if [ "${module}" != "${MAIN_FILE}" ] ; then source "${module}" fi done