Added busybox-w32 detection

This commit is contained in:
deajan 2018-10-26 12:28:31 +02:00
parent 3314f947b0
commit 08af105dd9
1 changed files with 9 additions and 3 deletions

View File

@ -31,7 +31,7 @@
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
#### OFUNCTIONS MICRO SUBSET #### #### OFUNCTIONS MICRO SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-RC2 _OFUNCTIONS_VERSION=2.3.0-RC2
_OFUNCTIONS_BUILD=2018102601 _OFUNCTIONS_BUILD=2018102602
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -1449,6 +1449,8 @@ function GetLocalOS {
# There is no good way to tell if currently running in BusyBox shell. Using sluggish way. # There is no good way to tell if currently running in BusyBox shell. Using sluggish way.
if ls --help 2>&1 | grep -i "BusyBox" > /dev/null; then if ls --help 2>&1 | grep -i "BusyBox" > /dev/null; then
localOsVar="BusyBox" localOsVar="BusyBox"
elif set -o | grep "winxp" > /dev/null; then
localOsVar="BusyBox-w32"
else else
# Detecting the special ubuntu userland in Windows 10 bash # Detecting the special ubuntu userland in Windows 10 bash
if grep -i Microsoft /proc/sys/kernel/osrelease > /dev/null 2>&1; then if grep -i Microsoft /proc/sys/kernel/osrelease > /dev/null 2>&1; then
@ -1481,7 +1483,7 @@ function GetLocalOS {
*"CYGWIN"*) *"CYGWIN"*)
LOCAL_OS="Cygwin" LOCAL_OS="Cygwin"
;; ;;
*"Microsoft"*) *"Microsoft"*|*"MS/Windows"*)
LOCAL_OS="WinNT10" LOCAL_OS="WinNT10"
;; ;;
*"Darwin"*) *"Darwin"*)
@ -1512,7 +1514,8 @@ function GetLocalOS {
fi fi
# Get Host info for Windows # Get Host info for Windows
if [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "BusyBox" ] || [ "$LOCAL_OS" == "Cygwin" ] || [ "$LOCAL_OS" == "WinNT10" ]; then localOsVar="$(uname -a)" if [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "BusyBox" ] || [ "$LOCAL_OS" == "Cygwin" ] || [ "$LOCAL_OS" == "WinNT10" ]; then
localOsVar="$localOsVar $(uname -a)"
if [ "$PROGRAMW6432" != "" ]; then if [ "$PROGRAMW6432" != "" ]; then
LOCAL_OS_BITNESS=64 LOCAL_OS_BITNESS=64
LOCAL_OS_FAMILY="Windows" LOCAL_OS_FAMILY="Windows"
@ -1526,6 +1529,9 @@ function GetLocalOS {
# Get Host info for Unix # Get Host info for Unix
else else
LOCAL_OS_FAMILY="Unix" LOCAL_OS_FAMILY="Unix"
fi
if [ "$LOCAL_OS_FAMILY" == "Unix" ]; then
if uname -m | grep '64' > /dev/null 2>&1; then if uname -m | grep '64' > /dev/null 2>&1; then
LOCAL_OS_BITNESS=64 LOCAL_OS_BITNESS=64
else else