diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-03-09 14:13:56 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-03-09 14:13:56 -0800 |
commit | 257ebf7f508d0a0352abf732019f00a1b3962741 (patch) | |
tree | 6c9e45adfe1a4b76b5d3bb65cb1910cfb1a7be89 /subx | |
parent | 7a22a21995001cbdf72c5e3b92f52c9abcee3202 (diff) | |
download | mu-257ebf7f508d0a0352abf732019f00a1b3962741.tar.gz |
4997
Diffstat (limited to 'subx')
-rwxr-xr-x | subx/dgen | 18 | ||||
-rwxr-xr-x | subx/drun | 18 | ||||
-rwxr-xr-x | subx/gen | 18 | ||||
-rwxr-xr-x | subx/run | 18 |
4 files changed, 40 insertions, 32 deletions
diff --git a/subx/dgen b/subx/dgen index 34f49deb..4aeec375 100755 --- a/subx/dgen +++ b/subx/dgen @@ -16,11 +16,13 @@ fi # subx_bin is up to date. export CFLAGS=-g -if [[ $1 == 'ex'* ]] -then - ./subx --map translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'` - exit $? -fi - -./subx --map translate *.subx apps/$1.subx -o apps/`echo $1 |sed 's/\..*//'` -exit $? +case $1 in + ex*) + ./subx --map translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'` + exit $? + ;; + *) + ./subx --map translate *.subx apps/$1.subx -o apps/`echo $1 |sed 's/\..*//'` + exit $? + ;; +esac diff --git a/subx/drun b/subx/drun index 15c7f747..b094f995 100755 --- a/subx/drun +++ b/subx/drun @@ -10,11 +10,13 @@ then exit 1 fi -if [[ $1 == 'ex'* ]] -then - CFLAGS=-g ./subx --map --trace run examples/$* - exit $? -fi - -CFLAGS=-g ./subx --map --trace run apps/$* -exit $? +case $1 in + ex*) + ./subx --map --trace run examples/$* + exit $? + ;; + *) + ./subx --map --trace run apps/$* + exit $? + ;; +esac 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 diff --git a/subx/run b/subx/run index cbb3e576..99de0777 100755 --- a/subx/run +++ b/subx/run @@ -10,11 +10,13 @@ then exit 1 fi -if [[ $1 == 'ex'* ]] -then - CFLAGS=-g ./subx run examples/$* - exit $? -fi - -CFLAGS=-g ./subx run apps/$* -exit $? +case $1 in + ex*) + ./subx run examples/$* + exit $? + ;; + *) + ./subx run apps/$* + exit $? + ;; +esac |