2022-07-19 13:11:24 +00:00
|
|
|
cd $(dirname $0)
|
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo "Sapphire utility script"
|
|
|
|
echo "-----------------------"
|
|
|
|
echo "sapphire.sh build <config>: build the project"
|
2022-07-19 13:17:00 +00:00
|
|
|
echo "sapphire.sh generate <generator> <config>: regenerate build files"
|
2022-07-19 13:11:24 +00:00
|
|
|
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";;
|
2022-07-19 13:17:00 +00:00
|
|
|
"generate") tools/generate.sh "$2" "$3";;
|
2022-07-19 13:11:24 +00:00
|
|
|
"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
|