summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdwer Vollering <vidwer@gmail.com>2021-01-11 14:07:21 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-01-25 09:08:35 +0000
commita3c44d843cf6690f508a59ac13b2f9c7b44e6032 (patch)
tree74677861ab4a572217ed2817d8755b95864a2684
parent3c70774629092f4a4945dc313e87735c6ab056d7 (diff)
util/board_status/board_status.sh: improve mktemp behaviour on non-linux OSes
Signed-off-by: Idwer Vollering <vidwer@gmail.com> Change-Id: I763b0e7c7c81a2447ed20db0a25047d106e30606 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49308 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rwxr-xr-xutil/board_status/board_status.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 5235a289fc..01fc7ecbd9 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -315,7 +315,14 @@ fi
# Results will be placed in a temporary location until we're ready to upload.
# If the user does not wish to upload, results will remain in /tmp.
-tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX)
+case $(uname) in
+ FreeBSD)
+ tmpdir=$(mktemp -d -t coreboot_board_status)
+ ;;
+ *)
+ tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX)
+ ;;
+esac
# Obtain coreboot config by running cbfstool on the ROM image. cbfstool may
# already exist in build/ or util/cbfstool/, but if not then we'll build it