Use $OS to determine whether running on windows or not.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/9cd69a34 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/9cd69a34 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/9cd69a34 Branch: refs/heads/develop Commit: 9cd69a34301772260c4db02e7afc3b0844247348 Parents: 567a360 Author: Marko Kiiskila <ma...@runtime.io> Authored: Sat Mar 4 20:42:45 2017 -0800 Committer: Marko Kiiskila <ma...@runtime.io> Committed: Fri Mar 10 13:10:54 2017 -0800 ---------------------------------------------------------------------- hw/scripts/common.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9cd69a34/hw/scripts/common.sh ---------------------------------------------------------------------- diff --git a/hw/scripts/common.sh b/hw/scripts/common.sh index ee85a90..2563b29 100644 --- a/hw/scripts/common.sh +++ b/hw/scripts/common.sh @@ -34,9 +34,8 @@ common_file_to_load () { # Also check if $COMSPEC is set or not. # windows_detect() { - BUILD_OS=`uname` WINDOWS=0 - if [ $BUILD_OS = "Windows_NT" ]; then + if [ $OS = "Windows_NT" ]; then WINDOWS=1 fi if [ $WINDOWS -eq 1 -a -z "$COMSPEC" ]; then