1#!/bin/bash 2# Copyright (c) 2022 Huawei Device Co., Ltd. 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15set -e 16 17# 下载google工具集depot_tools 18git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 19 20# 配置环境变量 21export CR_BRANCH="99.0.4844.88" 22export PATH="$PATH:${PWD}/depot_tools" 23 24# 下载代码 25fetch --nohooks android 26cd src 27git fetch origin $CR_BRANCH 28git checkout -b $CR_BRANCH FETCH_HEAD 29gclient sync --force --nohooks --with_branch_heads -D -v 30 31# 下载依赖 32./build/install-build-deps-android.sh 33gclient runhooks -v 34 35# 使用Openharmony nweb的patch 36git apply --whitespace=nowarn --ignore-whitespace -p2 ../patch/*.patch 37 38