#!/usr/bin/sh

# `freight` dispatches to `freight-*` commands.

set -e

# Just like the DevStructure tools, which try to be just like Git, accept
# a subcommand that really just completes the name of a real command.
COMMAND=$0-$1
[ -x "$COMMAND" ] && {
    shift
    exec "$COMMAND" "$@"
}

# Be helpful in this case since no subcommand was found.
echo "Usage: $(basename "$0") <command> [...]" >&2
echo "Common commands: add cache init" >&2
echo "See all available commands by typing \"$(basename "$0")-<TAB><TAB>\"" >&2
exit 1

# vim: et:ts=4:sw=4
