Fix condition for error message of signature script
[stockfish] / tests / signature.sh
index 6f5957a..2e5c183 100755 (executable)
@@ -16,7 +16,7 @@ signature=`./stockfish bench 2>&1 | grep "Nodes searched  : " | awk '{print $4}'
 if [ $# -gt 0 ]; then
    # compare to given reference
    if [ "$1" != "$signature" ]; then
-      if [ "x$1" == "x" ]; then
+      if [ -z "$signature" ]; then
          echo "No signature obtained from bench. Code crashed or assert triggered ?"
       else
          echo "signature mismatch: reference $1 obtained: $signature ."