diff options
Diffstat (limited to 'tools/run.sh')
| -rw-r--r-- | tools/run.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/run.sh b/tools/run.sh new file mode 100644 index 0000000..55f1094 --- /dev/null +++ b/tools/run.sh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # clean up | ||
| 4 | rm -rf bin && mkdir bin | ||
| 5 | |||
| 6 | # run the app if compilation succeeded | ||
| 7 | if javac -d "bin/classes" -cp "lib/*" src/main/java/com/example/App.java; then | ||
| 8 | echo "--- Running Application ---" | ||
| 9 | java -cp "bin/classes:lib/*" com.example.App | ||
| 10 | else | ||
| 11 | echo "Compilation failed." | ||
| 12 | fi | ||