diff --git a/redo-sh.do b/redo-sh.do index 77a66de..761a162 100644 --- a/redo-sh.do +++ b/redo-sh.do @@ -9,7 +9,7 @@ WARN= for sh in dash sh /usr/xpg4/bin/sh ash posh mksh ksh ksh88 ksh93 pdksh \ bash zsh busybox; do - printf "Testing %s... " "$sh" + printf "%-30s" "Testing $sh..." FOUND=`which $sh 2>/dev/null` || { echo "missing"; continue; } # It's important for the file to actually be named 'sh'. Some @@ -20,14 +20,30 @@ for sh in dash sh /usr/xpg4/bin/sh ash posh mksh ksh ksh88 ksh93 pdksh \ ln -s $FOUND $1.new/sh set +e - ( cd t && ../$1.new/sh shelltest.od >/dev/null 2>&1 ) + ( cd t && ../$1.new/sh shelltest.od >shelltest.tmp 2>&1 ) RV=$? set -e + msgs= + crash= + while read line; do + #echo "line: '$line'" >&2 + stripw=${line#warning: } + stripf=${line#failed: } + crash=$line + [ "$line" != "$stripw" ] && msgs="$msgs W$stripw" + [ "$line" != "$stripf" ] && msgs="$msgs F$stripf" + done