Skip to content

Commit

Permalink
first commit with binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
tojocky committed Feb 23, 2018
0 parents commit 98a3335
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gsutil*
38 changes: 38 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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 -fr gsutil.tar.gz
wget https://commondatastorage.googleapis.com/pub/gsutil.tar.gz
tar zxf gsutil.tar.gz
gsutil/gsutil --version
fi

mkdir -p mac
mkdir -p linux
mkdir -p win

# https://chromium.googlesource.com/chromium/buildtools/+/master/win/gn.exe.sha1
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
echo "mac: $(getGnHash mac)"
gsutil/gsutil cp gs://chromium-gn/$(getGnHash mac) mac/gn

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

Binary file added linux/gn
Binary file not shown.
Binary file added mac/gn
Binary file not shown.
Binary file added win/gn.exe
Binary file not shown.

0 comments on commit 98a3335

Please sign in to comment.