tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

upload_rc_binaries.sh (1456B)


      1 #!/bin/bash
      2 # Copyright 2017 The Chromium Authors
      3 # Use of this source code is governed by a BSD-style license that can be
      4 # found in the LICENSE file.
      5 set -eu
      6 
      7 # Builds new rc binaries at head and uploads them to google storage.
      8 # The new .sha1 files will be in the tree after this has run.
      9 
     10 if [[ "$OSTYPE" != "darwin"* ]]; then
     11  echo "this script must run on a mac"
     12  exit 1
     13 fi
     14 
     15 DIR="$(cd "$(dirname "${0}" )" && pwd)"
     16 SRC_DIR="$DIR/../../../.."
     17 
     18 # Make sure Linux and Windows sysroots are installed, for distrib.py.
     19 $SRC_DIR/build/linux/sysroot_scripts/install-sysroot.py --arch amd64
     20 $SRC_DIR/build/vs_toolchain.py update --force
     21 
     22 # Make a temporary directory.
     23 WORK_DIR=$(mktemp -d)
     24 if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
     25  echo "could not create temp dir"
     26  exit 1
     27 fi
     28 function cleanup {
     29  rm -rf "$WORK_DIR"
     30 }
     31 trap cleanup EXIT
     32 
     33 # Check out rc and build it in the temporary directory. Copy binaries over.
     34 pushd "$WORK_DIR" > /dev/null
     35 git clone -q https://github.com/nico/hack
     36 cd hack/res
     37 ./distrib.py "$SRC_DIR"
     38 popd > /dev/null
     39 cp "$WORK_DIR/hack/res/rc-linux64" "$DIR/linux64/rc"
     40 cp "$WORK_DIR/hack/res/rc-mac" "$DIR/mac/rc"
     41 cp "$WORK_DIR/hack/res/rc-win.exe" "$DIR/win/rc.exe"
     42 
     43 # Upload binaries to cloud storage.
     44 upload_to_google_storage.py -b chromium-browser-clang/rc "$DIR/linux64/rc"
     45 upload_to_google_storage.py -b chromium-browser-clang/rc "$DIR/mac/rc"
     46 upload_to_google_storage.py -b chromium-browser-clang/rc "$DIR/win/rc.exe"