Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download all latest binaries (unix only) #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/bash
trap 'exit' ERR

function getGnHash()
{
local OS_NAME=$1
local FILE_EXT=
if [ "$OS_NAME" == "win" ]; then
eval FILE_EXT=.exe
fi
local hash=`curl https://chromium.googlesource.com/chromium/buildtools/+/master/$OS_NAME/gn$FILE_EXT.sha1 | grep -Po '<td class="FileContents-lineContents" id="1"><span class="pln">\K[A-Za-z0-9]+'`
echo $hash
}

if [ ! -f gsutil/gsutil ]
then
rm gsutil.tar.gz
rm -fr gsutil.tar.gz
wget https://commondatastorage.googleapis.com/pub/gsutil.tar.gz
tar zxf gsutil.tar.gz
gsutil/gsutil --version
Expand All @@ -14,11 +25,14 @@ mkdir -p linux
mkdir -p win

# https://chromium.googlesource.com/chromium/buildtools/+/master/win/gn.exe.sha1
gsutil/gsutil cp gs://chromium-gn/1380b36db64aace2523d6bea32c59e48a51c82a4 win/gn.exe
echo "win: $(getGnHash win)"
gsutil/gsutil cp gs://chromium-gn/$(getGnHash win) win/gn.exe

# https://chromium.googlesource.com/chromium/buildtools/+/master/mac/gn.sha1
gsutil/gsutil cp gs://chromium-gn/a68b194afb05d6a6357cf2e2464136ed7723c305 mac/gn
echo "mac: $(getGnHash mac)"
gsutil/gsutil cp gs://chromium-gn/$(getGnHash mac) mac/gn

# https://chromium.googlesource.com/chromium/buildtools/+/master/linux64/gn.sha1
gsutil/gsutil cp gs://chromium-gn/4e3a214794b25c37e57b8c690c0b24daa631a420 linux/gn
echo "linux64: $(getGnHash linux64)"
gsutil/gsutil cp gs://chromium-gn/$(getGnHash linux64) linux/gn