summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2017-07-22 14:55:59 (EDT)
committer P. J. McDermott <pj@pehjota.net>2017-07-22 14:55:59 (EDT)
commit61db93cf5d3bea8c015941f6d0054da31b9d335d (patch)
treed922eeffc67cc31aa851ee1b06af60849a1fce8f /src
parentfa784c1df66b7f89c1fc1bdf76ff7bcae8e7fa83 (diff)
use(): Remove
Diffstat (limited to 'src')
-rw-r--r--src/main.sh38
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=