File tree Expand file tree Collapse file tree 4 files changed +35
-10
lines changed Expand file tree Collapse file tree 4 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 13
13
)
14
14
15
15
SCRIPT_PATH=$( pwd -P)
16
- CRREV=$( head -1 ./BUILD_NUMBER)
17
16
18
17
main () {
19
18
if [[ $1 == " --help" || $1 == " -h" ]]; then
@@ -41,15 +40,7 @@ compile_chromium() {
41
40
exit 1
42
41
fi
43
42
44
- # install depot_tools if they are not in system
45
- # NOTE: as of Feb 8, 2021, windows requires manual and separate
46
- # installation of depot_tools.
47
- if ! command -v autoninja > /dev/null; then
48
- if [[ ! -d " ${SCRIPT_PATH} /depot_tools" ]]; then
49
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git " ${SCRIPT_PATH} /depot_tools"
50
- fi
51
- export PATH=" ${SCRIPT_PATH} /depot_tools:$PATH "
52
- fi
43
+ source " ${SCRIPT_PATH} /ensure_depot_tools.sh"
53
44
54
45
if [[ $1 == " --compile-mac" * ]]; then
55
46
# As of Jan, 2021 Chromium mac compilation requires Xcode12.2
@@ -135,6 +126,7 @@ mirror_chromium() {
135
126
fi
136
127
fi
137
128
129
+ CRREV=$( head -1 " ${SCRIPT_PATH} /BUILD_NUMBER" )
138
130
if [[ "${PLATFORM} " == "--mirror-win32" ]]; then
139
131
CHROMIUM_URL="https://storage.googleapis.com/chromium-browser-snapshots/Win/${CRREV} /chrome-win.zip"
140
132
elif [[ "${PLATFORM} " == "--mirror-win64" ]]; then
Original file line number Diff line number Diff line change
1
+ # Since this script modifies PATH, it cannot be run in a subshell
2
+ # and must be sourced.
3
+ # Make sure it is sourced.
4
+ sourced=0
5
+ (return 0 2> /dev/null) && sourced=1 || sourced=0
6
+
7
+ if [[ $sourced == 0 ]]; then
8
+ echo ' ERROR: cannot run this script in a subshell'
9
+ echo ' This file modifies $PATH of the current shell, so it must be sourced instead'
10
+ echo ' Use `source ensure_depot_tool.sh` instead'
11
+ exit 1
12
+ fi
13
+
14
+ # Install depot_tools if they are not in system, and modify $PATH
15
+ # to include depot_tools
16
+ if ! command -v autoninja > /dev/null; then
17
+ if [[ $( uname) == " MINGW" * ]]; then
18
+ # NOTE: as of Feb 8, 2021, windows requires manual and separate
19
+ # installation of depot_tools.
20
+ echo " ERROR: cannot automatically install depot_tools on windows. Please, install manually"
21
+ exit 1
22
+ fi
23
+ SCRIPT_PATH=$( cd " $( dirname " $BASH_SOURCE " ) " ; pwd -P)
24
+ if [[ ! -d " ${SCRIPT_PATH} /depot_tools" ]]; then
25
+ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git " ${SCRIPT_PATH} /depot_tools"
26
+ fi
27
+ export PATH=" ${SCRIPT_PATH} /depot_tools:$PATH "
28
+ fi
Original file line number Diff line number Diff line change 16
16
17
17
cd electron-build-tools/third_party/goma
18
18
19
+ export GOMA_START_COMPILER_PROXY=true
20
+
19
21
if [[ $1 == " --help" ]]; then
20
22
echo " $( basename $0 ) [login|start|stop|--help]"
21
23
exit 0
Original file line number Diff line number Diff line change 29
29
30
30
function prepare_chromium_checkout {
31
31
cd " ${SCRIPT_PATH} "
32
+
33
+ source " ${SCRIPT_PATH} /chromium/ensure_depot_tools.sh"
34
+
32
35
if [[ -z " ${CR_CHECKOUT_PATH} " ]]; then
33
36
echo " ERROR: chromium compilation requires CR_CHECKOUT_PATH to be set to reuse checkout."
34
37
echo " NOTE: we expect '\$ CR_CHECKOUT_PATH/src' to exist to be a valid chromium checkout."
You can’t perform that action at this time.
0 commit comments