[coreboot-gerrit] New patch to review for coreboot: 42ace22 board-status: avoid shell error

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Sun Aug 10 15:44:54 CEST 2014


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6576

-gerrit

commit 42ace2233de85309591d68a4dd17538f288a71f3
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sun Aug 10 15:44:04 2014 +0200

    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 <patrick at georgi-clan.de>
---
 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 d1b2b7f..a91a3bb 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -46,7 +46,7 @@ test_cmd()
 		return 0
 	fi
 
-	if [ $3 -eq 1 ]; then
+	if [ "$3" = "1" ]; then
 		return 1
 	fi
 



More information about the coreboot-gerrit mailing list