about summary refs log tree commit diff stats
path: root/test_layers
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-08 19:11:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-08 19:16:08 -0700
commiteb917331a8de7ee724cd1eec5d0b9bb6ef76fae2 (patch)
tree59f0718cbc72b323660940eef90a986b376c64f0 /test_layers
parent1baa04dbd4c77d18b906fd185c762f613b36baa0 (diff)
downloadmu-eb917331a8de7ee724cd1eec5d0b9bb6ef76fae2.tar.gz
2942 - switch scripts to bash
I'm already using grep and perl, bash is no worse, and it's *much* nicer
to work in than plain Bourne sh.
Diffstat (limited to 'test_layers')
-rwxr-xr-xtest_layers10
1 files changed, 5 insertions, 5 deletions
diff --git a/test_layers b/test_layers
index b5160e03..81598241 100755
--- a/test_layers
+++ b/test_layers
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Test all layers:
 #   test_layers
 # Test layers after x:
@@ -10,19 +10,19 @@
 
 for f in [0-9]*
 do
-  if [ "$f" \< "$1" ]; then continue; fi
-  if expr "$2" \& "$f" \> "$2" >/dev/null; then exit; fi
+  if [[ $f < $1 ]]; then continue; fi
+  if [[ $2 && $f > $2 ]]; then continue; fi
   echo "=== $f"
   ./build_and_test_until $f || exit 1
 done
 
-if expr "$1" \& "$1" '==' "chessboard" >/dev/null
+if [[ ! $1 || $1 == chessboard ]]
 then
   echo "=== chessboard"
   ./mu test chessboard.mu || exit 1
 fi
 
-if expr "$1" \& "$1" '==' "edit" >/dev/null
+if [[ ! $1 || $1 == edit ]]
 then
   for f in edit/[0-9]*
   do