From 0c3ebf6c05d209089a028e86db8e6abeddf0a869 Mon Sep 17 00:00:00 2001 From: Thibaut Boustany Date: Fri, 24 Aug 2018 12:03:20 +0200 Subject: [PATCH] Fix OS and version not shown on Mac --- scripts/helpers/display-env.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/display-env.sh b/scripts/helpers/display-env.sh index 5f903413..2a94c8ad 100644 --- a/scripts/helpers/display-env.sh +++ b/scripts/helpers/display-env.sh @@ -7,9 +7,15 @@ if [ "$GIT_REVISION" == "" ]; then GIT_REVISION=$(git rev-parse HEAD) fi +if [[ $(uname) == 'Darwin' ]]; then + osVersion="$(sw_vers -productName) $(sw_vers -productVersion)" +else + osVersion="$(uname -srmo)" +fi + echo printf " │ \\e[4;1m%s\\e[0;0m\\n" "Ledger Live Desktop - ${GIT_REVISION}" -printf " │ \\e[1;30m%s\\e[1;0m\\n" "$(uname -srmo)" +printf " │ \\e[1;30m%s\\e[1;0m\\n" "${osVersion}" printf " │ \\e[2;1mcommit \\e[0;33m%s\\e[0;0m\\n" "$(git rev-parse HEAD)" echo