From 8b28317fdccc2eee3c2becd0e0a04960f30a50d8 Mon Sep 17 00:00:00 2001 From: moshix Date: Mon, 17 Apr 2023 04:44:23 -0500 Subject: [PATCH] fix ostype determination --- nicparseLinux.bash | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nicparseLinux.bash b/nicparseLinux.bash index c1df142..1fc6b7e 100644 --- a/nicparseLinux.bash +++ b/nicparseLinux.bash @@ -35,13 +35,12 @@ reset=`tput sgr0` } os_type() { -unameOut="$(uname -s)" -case "${unameOut}" in - Linux*) ostype=Linux;; - Darwin*) ostype=Mac;; - CYGWIN*) ostype=Cygwin;; - MINGW*) ostype=MinGw;; - *) ostype="UNKNOWN:${unameOut}" +case "$OSTYPE" in + freebsd*) ostype=FreeBSD;; + win32*) ostype=Windows;; + linux*) ostype=Linux;; + darwin*) ostype=Mac;; + *) ostype="UNKNOWN" esac #echo ${ostype} }