From 9435c48f20199f681eda4dca96b43c2dd895ed88 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 21 May 2019 22:11:01 +0200 Subject: [PATCH] Fix newer bash on Windows10 got rid of elder find cmd bug --- dev/ofunctions.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 2334c08..bb96bc0 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -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