summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..71e6e9a
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+# This script could be replaced by -run on TCC, but support for other compilers
+# should be at least somewhat maintained.
+
+./build.sh $@ &&
+
+if [[ "${@: -1}" == "gdb" ]]; then
+ gdb ./uengine
+elif [[ "${@: -1}" == "valgrind" ]]; then
+ valgrind --leak-check=full ./uengine
+else
+ time ./uengine
+fi