summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMartin Roth <martin.roth@se-eng.com>2014-07-10 14:57:34 -0600
committerMartin Roth <gaumless@gmail.com>2014-07-21 17:25:32 +0200
commit224617752b7457c3eb086cb3ad52b468a94a0eb7 (patch)
tree7bac75e7a7ac5aaf3d2a7f241e67f28b28da9fc9 /util
parent05560bfbe083190c0d1eeb87791696f66bffb218 (diff)
downloadcoreboot-224617752b7457c3eb086cb3ad52b468a94a0eb7.tar.xz
board_status.sh allow cmd() to not save output
- allow for cmd() to be run, but not pipe to a file. Change-Id: I3e1650e421a49a06218e082ceb5a60b7b4808ce8 Signed-off-by: Martin Roth <martin.roth@se-eng.com> Reviewed-on: http://review.coreboot.org/6258 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/board_status/board_status.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 7c321b3fe7..20ba48f943 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -60,10 +60,16 @@ _cmd()
return $EXIT_FAILURE
fi
+ if [ -n "$3" ]; then
+ pipe_location="${3}"
+ else
+ pipe_location="/dev/null"
+ fi
+
if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
- ssh root@${REMOTE_HOST} "$2" > "${3}" 2>&1
+ ssh root@${REMOTE_HOST} "$2" > "$pipe_location" 2>&1
else
- $2 > "${3}" 2>&1
+ $2 > "$pipe_location" 2>&1
fi
return $?