1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/bin/bash
-
- . __FFOO_DIR__/ffoo.sh
-
- ffoo import core
-
-
- usage() {
- usage_is "[-d] --list-modules" \
- "[-d] --list-functions [module]" \
- "[-d] --library-init" \
- "[-d] --version"
- }
-
- version_info() {
- echo "$(basename $0) (Fast Foo bash library) $FFOO_VERSION"
- echo
- echo "install path: __FFOO_DIR__"
- echo "data path: $FFOO_DATA_DIR"
- }
-
- while true; do case $1 in
- -d|--debug)
- FFOO_DEBUG=true;
- shift;
- ;;
- --library-init)
- echo "__FFOO_DIR__/ffoo.sh"
- exit 0
- ;;
- --list-modules)
- ffoo _list_all_modules
- exit $?
- ;;
- --list-functions)
- if test -n "$2";
- then
- ffoo _list_functions_in_mfile $(ffoo _list_mfiles_like $2)
- exit $?
- else
- ffoo _list_all_functions
- exit $?
- fi
- ;;
- --version)
- version_info
- exit 0
- ;;
- "")
- usage
- ;;
- esac;
- done
|