#!/bin/bash . <(ffoom init) export FFOO_INI_PATH="__SATURNIN_INI_PATH__:$SATURNIN_INI_PATH" ffoo import exit ffoo import core usage() { usage_is "[-d|-v] command [args...]" \ "help" } print_help() { echo "valid commands:" echo "" echo " czrates" echo " dmenu" echo " iam" echo " ini" echo " ip" echo " ln" echo " push" echo " revert" echo " watch" echo " www" } while true; do case $1 in -d|--debug) export FFOO_DEBUG=true; shift ;; -v|--verbose) export FFOO_VERBOSE=true; shift ;; --) shift; break ;; "") usage; ;; *) break; ;; esac done debug "\$@=$@" scmd=$1 shift case $scmd in czrates|dmenu|iam|ini|ip|ln|push|revert|watch|www) debug -v scmd debug "\$@='$@'" exec saturnin-$scmd "$@" ;; help) print_help; exit $FFOO_EXIT_OK ;; *) print_help; exit $FFOO_EXIT_USAGE ;; esac