2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 # Upload the generated output to Google storage.
10 if [ ! -d "$1" ]; then
11 echo "update.sh <output directory from build-all.sh>"
15 if echo "$PWD" |
grep -qE "/src/third_party/binutils$"; then
18 echo "update.sh should be run in src/third_party/binutils"
22 if [ ! -f ~
/.boto
]; then
23 echo "You need to run 'gsutil config' to set up authentication before running this script."
28 # Skip if not directory
29 if [ ! -d "$DIR" ]; then
35 export ARCH
="Linux_ia32"
38 */x86_64-unknown-linux-gnu
)
39 export ARCH
="Linux_x64"
43 echo "Unknown architecture directory $DIR"
48 if [ ! -d "$ARCH" ]; then
52 BINUTILS_TAR_BZ2
="$ARCH/binutils.tar.bz2"
53 FULL_BINUTILS_TAR_BZ2
="$PWD/$BINUTILS_TAR_BZ2"
54 if [ -f "${BINUTILS_TAR_BZ2}.sha1" ]; then
55 rm "${BINUTILS_TAR_BZ2}.sha1"
57 (cd "$DIR"; tar jcf
"$FULL_BINUTILS_TAR_BZ2" .
)
59 upload_to_google_storage.py
--bucket chromium-binutils
"$BINUTILS_TAR_BZ2"
60 git add
-f "${BINUTILS_TAR_BZ2}.sha1"
63 echo "Please commit the new .sha1 to the Chromium repository"