# Base environment script if [ -z "${__env_sh_loaded}" ] then if [ -z "${_root}" -o ! -d "${_root}" ] then printf "\033[1;31mSet _root to the directory containing lib/ before sourcing this file!\033[0m\n" kill $$ fi __env_sh_loaded=yes realpath() { ( cd "${1}"; pwd ) } __env_libdir="$(realpath "${_root}/lib")" want() { while [ -n "${1}" ] do if [ -f "${__env_libdir}/${1}.sh" ] then . "${__env_libdir}/${1}.sh" else printf "\033[1;31mFailed to load '${1}'\033[0m\n" fi shift done } err() { echo " ** ${*}" exit 1 } fi