Unverified Commit 51d5b1a2 authored by 刘冲's avatar 刘冲 Committed by GitHub

Use the default find if possible else fall back (#47522)

parent 9d4a35ba
...@@ -60,6 +60,13 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t ...@@ -60,6 +60,13 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
;; ;;
esac esac
# Use the default find if possible.
if [ -e /usr/bin/find ]; then
FIND=/usr/bin/find
else
FIND=find
fi
DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}" DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}"
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra/flutter/$ENGINE_VERSION/$DART_ZIP_NAME" DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"
...@@ -93,8 +100,8 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t ...@@ -93,8 +100,8 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
exit 1 exit 1
} }
rm -f -- "$DART_SDK_ZIP" rm -f -- "$DART_SDK_ZIP"
find "$DART_SDK_PATH" -type d -exec chmod 755 {} \; $FIND "$DART_SDK_PATH" -type d -exec chmod 755 {} \;
find "$DART_SDK_PATH" -type f $IS_USER_EXECUTABLE -exec chmod a+x,a+r {} \; $FIND "$DART_SDK_PATH" -type f $IS_USER_EXECUTABLE -exec chmod a+x,a+r {} \;
echo "$ENGINE_VERSION" > "$ENGINE_STAMP" echo "$ENGINE_VERSION" > "$ENGINE_STAMP"
# delete any temporary sdk path # delete any temporary sdk path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment