mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-21 02:22:41 +08:00
Greatly reduce time to fetch v8 sources. Time to execute `gclient-sync` Default varinant `real 21m2.279s` With `--no-history` - `real 0m53.638s`
40 lines
571 B
Bash
Executable File
40 lines
571 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT=$(readlink -f "$0" || grealpath "$0")
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
|
|
|
cd "$SCRIPTPATH"
|
|
|
|
if [ ! -d "depot_tools" ]
|
|
then
|
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
fi
|
|
|
|
export PATH=`pwd`/depot_tools:"$PATH"
|
|
gclient
|
|
|
|
if [ ! -d "./v8" ]
|
|
then
|
|
fetch v8
|
|
cd v8
|
|
git checkout -b 6.0 -t branch-heads/6.0
|
|
else
|
|
cd v8
|
|
fi
|
|
|
|
gclient sync --no-history
|
|
|
|
os=$(uname -s)
|
|
platform=""
|
|
case "$os" in
|
|
Linux*) platform="linux" ;;
|
|
*) exit ;;
|
|
esac
|
|
|
|
cd "$SCRIPTPATH"
|
|
|
|
if [[ "$platform" == "linux" ]]
|
|
then
|
|
./fetch_linux_correct.sh
|
|
fi
|