diff --git a/build b/build new file mode 100755 index 0000000..d104199 --- /dev/null +++ b/build @@ -0,0 +1,19 @@ +if [ ! -d output ]; then + + mkdir output + +fi + +dotnet build +if [ $? -eq 1 ]; then + exit 1 +fi + +ASSET_UIHTML_VERSION=2024.27.5 + +THEME_NAME=avondale + +for each in mocha-dotnet/src/assets/ui-html/css/common/*.less mocha-dotnet/src/assets/ui-html/css/$THEME_NAME/*.less; do cat $each; echo ""; done | lessc --plugin=less-plugin-clean-css=advanced - output/assets/ui-html/$ASSET_UIHTML_VERSION/css/mochaApp.css +cp mocha-dotnet/src/app/Mocha.ServerApplication/bin/Debug/net8.0/* output/ + +exit 0 diff --git a/cup b/cup new file mode 100755 index 0000000..e6293a6 --- /dev/null +++ b/cup @@ -0,0 +1,26 @@ +#!/bin/bash + +AUTO_REBUILD=1 + +# CONFIDENCE_LEVEL=Debug +# DOTNET_VERSION=8.0 +# APP_PATH=mocha-dotnet/src/app/Mocha.ServerApplication/bin/$CONFIDENCE_LEVEL/net$DOTNET_VERSION +APP_PATH=./output/ +APP_NAME=Mocha.ServerApplication + +if [ $AUTO_REBUILD -eq 1 ]; then + + # dotnet build + ./build + + if [ $? -eq 1 ]; then + + echo "There were build errors. Please fix the errors and re-run Mocha CUP." + exit + + fi + +fi + +$APP_PATH/$APP_NAME +