#!/bin/bash function startup_load () { local SDIRS local SDIR local DIRS local DIR local excludes [[ $(declare -F | grep module_load) ]] && echo module lib already loaded || source "$BASH_SHELL_BASE/module.lib" module_load file [[ $? -ne 0 ]] && echo unable to access the file module, aboarting load && return 1 [[ $1 ]] && DIRS=($1) || DIRS=(${BASH_SHELL_DIRS}) # llog "startup directories to try ${DIRS[*]}" SDIRS=() j=0 cnt=${#DIRS[@]} for ((i=0;i/dev/null) || startup_load