| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # Upload the generated output to Google storage. |
| echo "update.sh <output directory from build-all.sh>" |
| if echo "$PWD" | grep -qE "/src/third_party/binutils$"; then |
| echo "update.sh should be run in src/third_party/binutils" |
| if [ ! -f ~/.boto ]; then |
| echo "You need to run 'gsutil config' to set up authentication before running this script." |
| */x86_64-unknown-linux-gnu) |
| echo "Unknown architecture directory $DIR" |
| if [ ! -d "$ARCH" ]; then |
| BINUTILS_TAR_BZ2="$ARCH/binutils.tar.bz2" |
| FULL_BINUTILS_TAR_BZ2="$PWD/$BINUTILS_TAR_BZ2" |
| if [ -f "${BINUTILS_TAR_BZ2}.sha1" ]; then |
| rm "${BINUTILS_TAR_BZ2}.sha1" |
| (cd "$DIR"; tar jcf "$FULL_BINUTILS_TAR_BZ2" .) |
| upload_to_google_storage.py --bucket chromium-binutils "$BINUTILS_TAR_BZ2" |
| git add -f "${BINUTILS_TAR_BZ2}.sha1" |
| echo "Please commit the new .sha1 to the Chromium repository" |