forked from microg/cronet-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkout.sh
executable file
·39 lines (29 loc) · 1.1 KB
/
checkout.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# SPDX-FileCopyrightText: 2021, microG Project Team
# SPDX-License-Identifier: Apache-2.0
CHROMIUM_TAG=109.0.5414.75
CHROMIUM_REVISION=5b477e094962242f87536cc5089044bd37c0f052
ROOT=$PWD
if ! [ -d "$ROOT/depot_tools" ]; then
echo "## Preparing depot_tools..."
git clone "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
fi
PATH=$ROOT/depot_tools:$PATH
if ! [ -d "$ROOT/chromium" ]; then
echo "## Initializing chromium..."
mkdir "$ROOT/chromium"
cd "$ROOT/chromium" || exit
gclient config "https://chromium.googlesource.com/chromium/src.git"
echo 'target_os = ["android"]' >> .gclient
git init -q src
cd src || exit
git remote add -t $CHROMIUM_TAG origin "https://chromium.googlesource.com/chromium/src.git"
fi
cd "$ROOT/chromium/src" || exit
echo "## Fetching chromium..."
# We need to make sure we have the commit with latest Change-Id
git fetch -q --depth=20 origin "$CHROMIUM_REVISION"
git checkout --detach "$CHROMIUM_REVISION"
git checkout "$CHROMIUM_REVISION"
echo "## Running gclient sync..."
gclient sync -D --no-history --nohooks --revision=$CHROMIUM_REVISION