Skip to content

Commit

Permalink
added a funcion to replace find on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheraa committed Sep 13, 2021
1 parent 9af6bd5 commit 5d59266
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion upload-prebuilt-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5d59266

Please sign in to comment.