24 lines
813 B
Bash
24 lines
813 B
Bash
|
cd $(dirname $0)
|
||
|
|
||
|
usage()
|
||
|
{
|
||
|
echo "Sapphire utility script"
|
||
|
echo "-----------------------"
|
||
|
echo "sapphire.sh build <config>: build the project"
|
||
|
echo "sapphire.sh generate <generator>: regenerate build files"
|
||
|
echo "sapphire.sh format: run clang-format on source files"
|
||
|
echo "sapphire.sh clean: clean build files"
|
||
|
echo "sapphire.sh install <path>: install the project"
|
||
|
echo "sapphire.sh new-ast-node <name>: create a new AST node"
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
"build") tools/build.sh "$2";;
|
||
|
"generate") tools/generate.sh "$2";;
|
||
|
"format") tools/format.sh;;
|
||
|
"clean") rm -rf build;;
|
||
|
"install") tools/install.sh "$2";;
|
||
|
"new-ast-node") tools/generateASTNode.sh $2;;
|
||
|
"help") usage;;
|
||
|
*) echo "Invalid action, run './sapphire.sh help' for a list of available options.";;
|
||
|
esac
|