From e9b748ff4440393565d323283180ccb99eba0722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 19 Nov 2016 08:44:20 +0100 Subject: test/sam: try to fall back to `9 ssam` if ssam is not found --- sam/test.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'sam') diff --git a/sam/test.sh b/sam/test.sh index 42970b3..a3cc1e9 100755 --- a/sam/test.sh +++ b/sam/test.sh @@ -5,12 +5,18 @@ NL=' PLAN9="/usr/local/plan9/bin" [ -z "$VIS" ] && VIS="../../vis" -[ -z "$SSAM" ] && SSAM="$PLAN9/ssam" -type "$SSAM" >/dev/null 2>&1 || { - echo "ssam(1) not found, skipping tests" - exit 0 -} +if [ -z "$SSAM" ] || ! type "$SSAM" >/dev/null 2>&1; then + SSAM="$PLAN9/ssam" + if ! type "$SSAM" >/dev/null 2>&1; then + if type 9 >/dev/null 2>&1; then + SSAM="9 ssam" + else + echo "ssam(1) not found, skipping tests" + exit 0 + fi + fi +fi TESTS=$1 [ -z "$TESTS" ] && TESTS=$(find . -name '*.cmd' | sed 's/\.cmd$//g') @@ -18,6 +24,7 @@ TESTS=$1 TESTS_RUN=0 TESTS_OK=0 +echo "$SSAM" $VIS -v for t in $TESTS; do -- cgit v1.2.3