Fix newer bash on Windows10 got rid of elder find cmd bug

pull/167/head
deajan 5 years ago
parent 4a1001a40f
commit 9435c48f20

@ -30,8 +30,8 @@
#### OFUNCTIONS FULL SUBSET ####
#### OFUNCTIONS MINI SUBSET ####
#### OFUNCTIONS MICRO SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-RC2
_OFUNCTIONS_BUILD=2019031502
_OFUNCTIONS_VERSION=2.3.0-dev-postRC2
_OFUNCTIONS_BUILD=2019052102
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -1700,7 +1700,7 @@ GetOs
ENDSSH
if [ $? -ne 0 ]; then
Logger "Cannot connect to remote system [$REMOTE_HOST] port [$REMOTE_PORT]." "CRITICAL"
Logger "Cannot connect to remote system [$REMOTE_HOST] port [$REMOTE_PORT] as [$REMOTE_USER]." "CRITICAL"
if [ -f "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" ]; then
Logger "$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP")" "ERROR"
fi
@ -2123,7 +2123,13 @@ function InitLocalOSDependingSettings {
## Getting running processes is quite different
## Ping command is not the same
if [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ] || [ "$LOCAL_OS" == "Microsoft" ] || [ "$LOCAL_OS" == "WinNT10" ]; then
FIND_CMD=$(dirname $BASH)/find
if [ -f "/usr/bin/find" ]; then
FIND_CMD="/usr/bin/find"
elif [ -f "/bin/find" ]; then
FIND_CMD="/bin/find"
else
FIND_CMD="$(dirname $BASH)/find"
fi
PING_CMD='$SYSTEMROOT\system32\ping -n 2'
# On BSD, when not root, min ping interval is 1s

Loading…
Cancel
Save