bml-cli/osdetect.sh

21 lines
565 B
Bash
Raw Normal View History

2021-04-29 15:23:59 +05:00
#!/bin/bash
2021-05-10 22:51:11 +05:00
if [ "uname -r | grep -oE microsoft" = "microsoft" ] || [ $(uname -r | grep -oE Microsoft) = "Microsoft" ]
2021-04-29 15:23:59 +05:00
then
2021-05-10 22:14:08 +05:00
OS=windows
#echo ${red}WSL Not Supported!${reset} 1>&2
#exit
2021-05-10 22:34:46 +05:00
elif [ $(uname -a | grep -oE Darwin | tail -n1) = "Darwin" ]
2021-04-29 15:23:59 +05:00
then
2021-05-10 22:14:08 +05:00
OS=macos
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
#echo ${red}MacOS Not Supported!${reset} 1>&2
#exit
2021-05-01 04:38:03 +05:00
elif [ "uname -a | grep -oE Android" = "Android" ]
then
2021-05-10 22:14:08 +05:00
OS=android
2021-04-29 15:23:59 +05:00
else
:
fi
source readpass.sh