Added a builder script

The build script reduces the amount of IO on the disk when starting a new bash session.
This should speed up the startup time of the shell when under heavy IO load. There is
also a short reloader command that calls the builder script when things are modified to
avoid hot reloading of the scripts in the directory.
This commit is contained in:
Luke 2021-12-28 11:32:30 -08:00
parent 4a75f67b98
commit 148ef9e7ba
6 changed files with 60 additions and 5 deletions

View file

@ -61,15 +61,22 @@ function loadDirectory() {
###########
# Load information that is in any extra random installed directory.
__LOAD_DIRS=(/opt/fpga-opentoolforge/current /opt/fpga /opt/makemkv /opt/icestorm /opt/gemini $HOME/.gem/ruby/2.7.0)
for DIR_EXPAND in ${__LOAD_DIRS[*]}; do
__LOAD_DIRS=(
/opt/poke
/opt/fpga
/opt/makemkv
/opt/icestorm
/opt/gemini
$HOME/.gem/ruby/2.7.0
)
for DIR_EXPAND in ${__LOAD_DIRS[@]}; do
loadDirectory $DIR_EXPAND
done
unset DIR_EXPAND __LOAD_DIRS
# set PATH so it includes user's private bin if it exists
__LOAD_PATHS=("$HOME/.cargo/bin" "$HOME/bin" "$HOME/.bin" )
for DIR_EXPAND in ${__LOAD_PATHS[*]}; do
for DIR_EXPAND in ${__LOAD_PATHS[@]}; do
pathStripAdd "$DIR_EXPAND" front
done
unset DIR_EXPAND __LOAD_PATHS