link bashrc
This commit is contained in:
parent
7f1ade34d0
commit
dd1ee57228
1 changed files with 10 additions and 4 deletions
14
bash/main.sh
14
bash/main.sh
|
@ -1,11 +1,17 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
FILE="$(realpath "${BASH_SOURCE[0]}")"
|
MAIN_FILE="$(realpath "${BASH_SOURCE[0]}")"
|
||||||
ROOT="$(dirname "${FILE}")"
|
MAIN_ROOT="$(dirname "${MAIN_FILE}")"
|
||||||
|
|
||||||
|
function link_bashrc {
|
||||||
|
local file='/etc/bash.bashrc'
|
||||||
|
rm --force "${file}"
|
||||||
|
ln --symbolic "${MAIN_FILE}" "${file}"
|
||||||
|
}
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
local module
|
local module
|
||||||
for module in "${ROOT}"/*.sh ; do
|
for module in "${MAIN_ROOT}"/*.sh ; do
|
||||||
if [ "${module}" != "${FILE}" ] ; then
|
if [ "${module}" != "${MAIN_FILE}" ] ; then
|
||||||
source "${module}"
|
source "${module}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue