From 5d5926674433338fcf1e97a3324fa30fe2001f31 Mon Sep 17 00:00:00 2001 From: Charafeddine Cheraa Date: Mon, 13 Sep 2021 14:41:49 +0100 Subject: [PATCH] added a funcion to replace find on windows evolvedbinary/fusion-studio#98 --- upload-prebuilt-binaries.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/upload-prebuilt-binaries.sh b/upload-prebuilt-binaries.sh index 8c99325..1b290d5 100755 --- a/upload-prebuilt-binaries.sh +++ b/upload-prebuilt-binaries.sh @@ -38,5 +38,19 @@ if [[ $1 ]]; then fi else export script="$( cd "$( dirname "$0" )" &> /dev/null && pwd )/$(basename $0)"; - find node_modules -wholename "*/build/Release/*.node" -exec bash -c '[[ $(dirname $1) == *build/Release ]] && [[ $1 =~ node_modules/(.*)/build/Release/(.*).node ]] && [[ ${BASH_REMATCH[2]} != ffmpeg ]] && $script $1' bash {} \; + if [[ "$OSTYPE" == "msys"* ]]; then + root=$(cd "$(dirname "$1")"; pwd)/$(basename "$1") + function lsr { + for name in $(ls $1); do + path=$1/$name + if [[ $(dirname $path) == */build/Release ]] && [[ $path =~ $root/(.*)/build/Release/(.*).node ]] && [[ ${BASH_REMATCH[2]} != ffmpeg ]]; then + $script $path + fi + [ -d $path ] && lsr $path + done + } + lsr $root + else + find node_modules -wholename "*/build/Release/*.node" -exec bash -c '[[ $(dirname $1) == *build/Release ]] && [[ $1 =~ node_modules/(.*)/build/Release/(.*).node ]] && [[ ${BASH_REMATCH[2]} != ffmpeg ]] && $script $1' bash {} \; + fi fi \ No newline at end of file