diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2018-02-20 01:36:02 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2018-02-20 01:38:15 -0800 |
commit | ba838feae98ad0e3a403429422bad3f6fa4367cc (patch) | |
tree | 56df29adee7d0394a2cc359e930c36e4f410602c | |
parent | cd1113882450382ebe39db7dd8690812bac1aba7 (diff) | |
download | mu-ba838feae98ad0e3a403429422bad3f6fa4367cc.tar.gz |
4211
Just ran into first issue from using the portable /bin/sh rather than a modern shell: https://stackoverflow.com/questions/15744421/read-command-doesnt-wait-for-input Turn on errexit everywhere.
-rwxr-xr-x | build_and_test_until | 1 | ||||
-rwxr-xr-x | clean | 1 | ||||
-rwxr-xr-x | git_log_filtered | 1 | ||||
-rwxr-xr-x | linkify/build | 1 | ||||
-rwxr-xr-x | linkify/clean | 2 | ||||
-rwxr-xr-x | mu | 1 | ||||
-rwxr-xr-x | snapshot_lesson | 1 | ||||
-rwxr-xr-x | subx/build_and_test_until | 1 | ||||
-rwxr-xr-x | subx/clean | 1 | ||||
-rwxr-xr-x | subx/subx | 1 | ||||
-rwxr-xr-x | test_layers | 1 |
11 files changed, 12 insertions, 0 deletions
diff --git a/build_and_test_until b/build_and_test_until index 3e353885..2220be17 100755 --- a/build_and_test_until +++ b/build_and_test_until @@ -1,4 +1,5 @@ #!/bin/sh +set -e ./clean top-level ./build --until $1 && ./mu_bin test diff --git a/clean b/clean index e9b2eeb9..3b629daa 100755 --- a/clean +++ b/clean @@ -1,4 +1,5 @@ #!/bin/sh +set -e set -v rm -rf mu.cc core.mu mu_bin* *_list .build diff --git a/git_log_filtered b/git_log_filtered index b17cd3bf..7ab6d43e 100755 --- a/git_log_filtered +++ b/git_log_filtered @@ -4,5 +4,6 @@ # I usually run this through an alias local to this repo: # $ git config alias.ll '!./git_log_filtered' # $ git ll --stat +set -e git log $* -- . ":(exclude)html" diff --git a/linkify/build b/linkify/build index 54c3f459..3c96ad00 100755 --- a/linkify/build +++ b/linkify/build @@ -1,3 +1,4 @@ #!/bin/sh +set -e c++ -g linkify.cc -o linkify diff --git a/linkify/clean b/linkify/clean index 7838b78a..3feef907 100755 --- a/linkify/clean +++ b/linkify/clean @@ -1,2 +1,4 @@ #!/bin/sh +set -e + rm -rf linkify *.dSYM diff --git a/mu b/mu index 964816f3..7e3d6be6 100755 --- a/mu +++ b/mu @@ -1,5 +1,6 @@ #!/bin/sh # Run interpreter, first compiling if necessary. +set -e ./build && ./mu_bin "$@" diff --git a/snapshot_lesson b/snapshot_lesson index 2a943c37..cd4723c1 100755 --- a/snapshot_lesson +++ b/snapshot_lesson @@ -1,6 +1,7 @@ #!/bin/sh # Hacky little helper called from edit/ and sandbox/ apps to save a snapshot # of lesson/ using git. +set -e test -d lesson/.git || exit 0 # give up if it's not a git repo diff --git a/subx/build_and_test_until b/subx/build_and_test_until index 25daac2d..874d1254 100755 --- a/subx/build_and_test_until +++ b/subx/build_and_test_until @@ -1,4 +1,5 @@ #!/bin/sh +set -e ./clean top-level # ignore subsidiary tools like tangle and cleave ./build --until $1 && ./subx_bin test diff --git a/subx/clean b/subx/clean index 5243f243..6ee90a9c 100755 --- a/subx/clean +++ b/subx/clean @@ -1,4 +1,5 @@ #!/bin/sh +set -e set -v rm -rf subx.cc subx_bin* *_list diff --git a/subx/subx b/subx/subx index 5d7a237c..257e2f13 100755 --- a/subx/subx +++ b/subx/subx @@ -1,4 +1,5 @@ #!/bin/sh # Run SubX VM, first compiling if necessary. +set -e ./build && ./subx_bin "$@" diff --git a/test_layers b/test_layers index 69d9818e..e004b796 100755 --- a/test_layers +++ b/test_layers @@ -13,6 +13,7 @@ # test_layers x y # Test all layers for a specific app: # test_layers app +set -e if [[ $1 == one-off ]] then |