#!/bin/bash

DIRNAME=$(dirname $0)
lib=$DIRNAME/lib

case "$1" in
    "-a" | "--assets" )
        $lib/assets.sh
        ;;
    "-b" | "--build" )
        $lib/build.sh
        ;;
    "-bc" | "--build-coffee" )
        $lib/build.sh 1
        ;;
    "-c" | "--compile" )
        $lib/compile.sh
        ;;
    "-C" | "--compile-app" )
        $lib/compile-app.sh
        ;;
    "-d" | "--debug" )
        $lib/debug.sh
        ;;
    "-D" | "--debug-app" )
        $lib/debug-app.sh
        ;;
    "-t" | "--test" )
        $lib/test.sh
        ;;
    "-T" | "--test-app" )
        $lib/test-app.sh
        ;;
    "-u" | "--update" )
        $lib/update.sh
        ;;
    * )
        echo ""
        echo "  Usage: nodame <OPTION>"
        echo ""
        echo -e "  -a\t--assets\tbuild assets"
        echo -e "  -b\t--build\t\tbuild application base"
        echo -e "  -c\t--compile\tcompile nodame's coffee-script"
        echo -e "  -C\t--compile-app\tcompile app's coffee-script"
        echo -e "  -d\t--debug\t\tdebug js file"
        echo -e "  -D\t--debug-app\t\tdebug app's js file"
        echo -e "  -t\t--test\t\trun nodame's unit testing"
        echo -e "  -T\t--test-app\t\trun app's unit testing"
        echo -e "  -u\t--update\tupdate build data"
        echo ""
        ;;
esac
