about summary refs log tree commit diff stats
path: root/subx/gen
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-09 14:13:56 -0800
committerKartik Agaram <vc@akkartik.com>2019-03-09 14:13:56 -0800
commit257ebf7f508d0a0352abf732019f00a1b3962741 (patch)
tree6c9e45adfe1a4b76b5d3bb65cb1910cfb1a7be89 /subx/gen
parent7a22a21995001cbdf72c5e3b92f52c9abcee3202 (diff)
downloadmu-257ebf7f508d0a0352abf732019f00a1b3962741.tar.gz
4997
Diffstat (limited to 'subx/gen')
-rwxr-xr-xsubx/gen18
1 files changed, 10 insertions, 8 deletions
diff --git a/subx/gen b/subx/gen
index a2f1de4a..0acbe3d8 100755
--- a/subx/gen
+++ b/subx/gen
@@ -16,11 +16,13 @@ fi
 # subx_bin is up to date.
 export CFLAGS=-g
 
-if [[ $1 == 'ex'* ]]
-then
-  ./subx translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'`
-  exit $?
-fi
-
-./subx translate *.subx apps/$1.subx  -o apps/`echo $1 |sed 's/\..*//'`
-exit $?
+case $1 in
+  ex*)
+    ./subx translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'`
+    exit $?
+    ;;
+  *)
+    ./subx translate *.subx apps/$1.subx  -o apps/`echo $1 |sed 's/\..*//'`
+    exit $?
+    ;;
+esac