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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue