From 4ef309e85db0f44888650f98eead220ad147aa14 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 10 Aug 2014 15:44:04 +0200 Subject: [PATCH] board-status: avoid shell error [ $3 -eq 1 ] fails if no third argument is given. [ "$3" -eq 1 ] still fails. Doing a string comparison is robust across shells. Change-Id: I3ee388fdbe51b7ab9344d86e67827654714d3191 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/6576 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel --- util/board_status/board_status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh index 7389478614..de83d36325 100755 --- a/util/board_status/board_status.sh +++ b/util/board_status/board_status.sh @@ -49,7 +49,7 @@ test_cmd() return 0 fi - if [ $3 -eq 1 ]; then + if [ "$3" = "1" ]; then return 1 fi