mappers=""
scanners=""
version="unknown"
+name="`basename "$0"`"
+
+unset LANG
register_mapper()
{
load()
{
- for lib in `ls "$1"/[0-9][0-9]_*.sh | sort`; do
+ local X
+ local lib
+
+ X="`dirname "$0"`"
+ if [ "`basename "$X"`" == "bin" ]; then # `"
+ libdir="`dirname "$X"`/share/$name" #`"
+ fi
+ if [ -z "$libdir" -o ! -d "$libdir" ]; then
+ libdir="$X/lib"
+ fi
+
+ if [ ! -d "$libdir" ]; then
+ echo "! Library directory not found" 1>&2
+ exit 1
+ fi
+
+ for lib in `ls "$libdir"/[0-9][0-9]_*.sh | sort`; do
source $lib
done
}
###########################################################################
-unset LANG
-
-#### Find library directory and load library files
-
-name="`basename "$0"`"
-X="`dirname "$0"`"
-if [ "`basename "$X"`" == "bin" ]; then # `"
- libdir="`dirname "$X"`/share/$name" #`"
-fi
-if [ -z "$libdir" -o ! -d "$libdir" ]; then
- libdir="$X/lib"
-fi
-
-if [ ! -d "$libdir" ]; then
- echo "! Library directory not found" 1>&2
- exit 1
-fi
+#### Load library modules
-load "$libdir"
+load
#### Parse command line arguments