Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/binutils/upload.sh

Issue 209853003: Adding binutils as a DEPS to allow DebugFission on Ubuntu Precise when compiling with clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing DEPS file. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright 2014 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Upload the generated output to Google storage. 6 # Upload the generated output to Google storage.
7 7
8 if [ ! -d $1 ]; then 8 set -e
9
10 if [ ! -d "$1" ]; then
9 echo "update.sh <output directory from build-all.sh>" 11 echo "update.sh <output directory from build-all.sh>"
10 exit 1 12 exit 1
11 fi 13 fi
12 14
15 if echo "$PWD" | grep -qE "/src/third_party/binutils$"; then
16 echo -n
17 else
18 echo "update.sh should be run in src/third_party/binutils"
19 exit 1
20 fi
21
13 if [ ! -f ~/.boto ]; then 22 if [ ! -f ~/.boto ]; then
14 echo "You need to run 'gsutil config' to set up authentication before running this script." 23 echo "You need to run 'gsutil config' to set up authentication before running this script."
15 exit 1 24 exit 1
16 fi 25 fi
17 26
18 BINUTILS_TAR_BZ2=linux/binutils.tar.bz2 27 for DIR in $1/*; do
19 if [ -f ${BINUTILS_TAR_BZ2}.sha1 ]; then 28 # Skip if not directory
20 echo "Please remove ${BINUTILS_TAR_BZ2}.sha1 before starting..." 29 if [ ! -d "$DIR" ]; then
21 exit 1 30 continue
22 fi 31 fi
23 32
24 (cd $1/; tar -jcvf ../$BINUTILS_TAR_BZ2 .) 33 case "$DIR" in
25 ../depot_tools/upload_to_google_storage.py --bucket chromium-binutils $BINUTILS_ TAR_BZ2 34 */i686-pc-linux-gnu)
35 export ARCH="Linux_ia32"
36 ;;
37
38 */x86_64-unknown-linux-gnu)
39 export ARCH="Linux_x64"
40 ;;
41
42 *)
43 echo "Unknown architecture directory $DIR"
44 exit 1
45 ;;
46 esac
47
48 if [ ! -d "$ARCH" ]; then
49 mkdir -p "$ARCH"
50 fi
51
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"
56 fi
57 (cd "$DIR"; tar jcf "$FULL_BINUTILS_TAR_BZ2" .)
58
59 upload_to_google_storage.py --bucket chromium-binutils "$BINUTILS_TAR_BZ2"
60 git add -f "${BINUTILS_TAR_BZ2}.sha1"
Lei Zhang 2014/04/01 05:10:48 You may want to print out a final message after th
mithro-old 2014/04/02 04:22:33 Done.
61 done
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698