diff --git a/sh/load.sh b/sh/load.sh index 94d505c..b91237f 100755 --- a/sh/load.sh +++ b/sh/load.sh @@ -5,10 +5,14 @@ TOOLKIT=/etc/toolkit +setopt +o nomatch + load_scripts_in_dir() { - for sh in ${TOOLKIT}/sh/custom/*.sh; do - test -r "$sh" && . "$sh" - done + if [[ -d $1 ]]; then + for sh in $1/*.sh; do + test -r "$sh" && . "$sh" + done + fi } create_dir_if_not_exists() {