X="`dirname "$0"`"
if [ "`basename "$X"`" == "bin" ]; then # `"
- libdir="`dirname "$X"`/share/$name" #`"
+ libdir="`dirname "$X"`/share/$name" #`"
fi
if [ -z "$libdir" -o ! -d "$libdir" ]; then
- libdir="$X/lib"
+ libdir="$X/lib"
fi
if [ ! -d "$libdir" ]; then
- echo "! Library directory not found" 1>&2
- exit 1
+ echo "! Library directory not found" 1>&2
+ exit 1
fi
for lib in `ls "$libdir"/[0-9][0-9]_*.sh | sort`; do
- source $lib
+ source $lib
done
}
local found
found=1
while [ -n "$found" ]; do
- found=""
- for name in $mappers; do
- if detect_$name; then
- found=1
- if do_$name; then
- return
- fi
- break
- fi
- done
+ found=""
+ for name in $mappers; do
+ if detect_$name; then
+ found=1
+ if do_$name; then
+ return
+ fi
+ break
+ fi
+ done
done
}
scan()
{
for name in $scanners; do
- if detect_$name; then
- if do_$name; then
- return
- fi
- fi
+ if detect_$name; then
+ if do_$name; then
+ return
+ fi
+ fi
done
}
while true; do
case "$1" in
- -h|--help) help="0"; shift ;;
- --noscan) noscan="0"; shift ;;
- -V|--version) echo "$name $version"; exit 0 ;;
- --) shift; break ;;
- *) echo "! internal error"; exit 1 ;;
+ -h|--help) help="0"; shift ;;
+ --noscan) noscan="0"; shift ;;
+ -V|--version) echo "$name $version"; exit 0 ;;
+ --) shift; break ;;
+ *) echo "! internal error"; exit 1 ;;
esac
done
EOF
for mapper in $mappers; do
- describe_$mapper
+ describe_$mapper
done
cat <<EOF
EOF
for scanner in $scanners; do
- describe_$scanner
+ describe_$scanner
done
cat <<EOF