Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / third_party / binutils / upload.sh
1 #!/bin/sh
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.
5
6 # Upload the generated output to Google storage.
7
8 if [ ! -d $1 ]; then
9   echo "update.sh <output directory from build-all.sh>"
10   exit 1
11 fi
12
13 if [ ! -f ~/.boto ]; then
14   echo "You need to run 'gsutil config' to set up authentication before running this script."
15   exit 1
16 fi
17
18 BINUTILS_TAR_BZ2=linux/binutils.tar.bz2
19 if [ -f ${BINUTILS_TAR_BZ2}.sha1 ]; then
20   echo "Please remove ${BINUTILS_TAR_BZ2}.sha1 before starting..."
21   exit 1
22 fi
23
24 (cd $1/; tar -jcvf ../$BINUTILS_TAR_BZ2 .)
25 ../depot_tools/upload_to_google_storage.py --bucket chromium-binutils $BINUTILS_TAR_BZ2