summaryrefslogtreecommitdiff
path: root/src/choose.sh
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-14 21:28:19 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-14 21:28:19 +0200
commit1087d4df2a7342d2832ba3bab1843bf4a3040775 (patch)
tree96cd6ea198cc542f29c0660d5e5f7083af84d711 /src/choose.sh
add version 0.12.10HEADmaster
Diffstat (limited to 'src/choose.sh')
-rw-r--r--src/choose.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/choose.sh b/src/choose.sh
new file mode 100644
index 0000000..feff2da
--- /dev/null
+++ b/src/choose.sh
@@ -0,0 +1,18 @@
+
+result="$4"
+
+case "$1" in
+ *c*) ./compile $2.c >/dev/null 2>&1 || result="$3" ;;
+esac
+
+case "$1" in
+ *l*) ./load $2 >/dev/null 2>&1 || result="$3" ;;
+esac
+
+case "$1" in
+ *r*) ./$2 >/dev/null 2>&1 || result="$3" ;;
+esac
+
+rm -f $2.o $2
+
+exec cat "$result"