link bashrc

This commit is contained in:
Marc Beninca 2023-05-12 23:38:42 +02:00
parent 7f1ade34d0
commit dd1ee57228

View file

@ -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