cd $(dirname $0) usage() { echo "Sapphire utility script" echo "-----------------------" echo "sapphire.sh build : build the project" echo "sapphire.sh generate : regenerate build files" echo "sapphire.sh format: run clang-format on source files" echo "sapphire.sh clean: clean build files" echo "sapphire.sh install : install the project" echo "sapphire.sh new-ast-node : create a new AST node" } case $1 in "build") tools/build.sh "$2";; "generate") tools/generate.sh "$2" "$3";; "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