29 lines
636 B
Bash
Executable File
29 lines
636 B
Bash
Executable File
# ______ ____ __ __
|
|
# / __/ / ___ / / / / / ___ ___ ____/ /__ ____
|
|
# _\ \/ _ \/ -_) / / / /__/ _ \/ _ `/ _ / -_) __/
|
|
#/___/_//_/\__/_/_/ /____/\___/\_,_/\_,_/\__/_/
|
|
|
|
TOOLKIT=/etc/toolkit
|
|
|
|
setopt +o nomatch
|
|
|
|
load_scripts_in_dir() {
|
|
if [[ -d $1 ]]; then
|
|
for sh in $1/*.sh; do
|
|
test -r "$sh" && . "$sh"
|
|
done
|
|
fi
|
|
}
|
|
|
|
create_dir_if_not_exists() {
|
|
if [[ ! -d $1 ]]; then
|
|
mkdir -p $1
|
|
fi
|
|
}
|
|
|
|
# Load custom scripts (aliases, variables, etc...)
|
|
load_scripts_in_dir $TOOLKIT/sh/custom-scripts
|
|
|
|
# Scripts ran to modify existing toolkit updates
|
|
load_scripts_in_dir $TOOLKIT/sh/patch-scripts
|