diff options
Diffstat (limited to 'src/main.sh')
-rw-r--r-- | src/main.sh | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/main.sh b/src/main.sh index 8ee09c4..4861181 100644 --- a/src/main.sh +++ b/src/main.sh @@ -38,44 +38,6 @@ conf_gzip= lock= exit_status= -# use() must be defined inline so it can be used to load other modules. -use() -{ - local module="${1}" - local default_dir= - local lib_subdir= - local dir= - - if [ "x${module%/*}" = "x${module}" ]; then - default_dir="${PKGLIBDIR}" - lib_subdir='' - else - case "${module%/*}" in - 'cmd') - loading_cmd="$(printf '%s' "${module##*/}" | \ - tr '[A-Z]' '[a-z]' | \ - tr -C '[a-z0-9_]' '_')" - default_dir="${PKGLIBCMDDIR}" - lib_subdir='cmd' - ;; - esac - fi - - if [ "${ARCHMAN_LIBDIR+set}" = 'set' ]; then - dir="${ARCHMAN_LIBDIR:-.}/${lib_subdir}" - else - dir="${default_dir}" - fi - - if [ -f "${dir}/${module##*/}.sho" ]; then - . "${dir}/${module##*/}.sho" - else - printf '%s: Error: Failed to load module "%s": %s\n' \ - "${0##*/}" "${module}" 'no such file or directory' >&2 - exit 2 - fi -} - main() { local cmd= |