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

Unified 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: Using seperate release dirs and same detect_host_arch as common.gypi Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/binutils/linux/.keepme ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/binutils/upload.sh
diff --git a/third_party/binutils/upload.sh b/third_party/binutils/upload.sh
index 27c11ceb8f774a27aed3db583cb8da1541bac54b..5ff10aad3ad7029ab259bb1f447e8d23967c4e2c 100755
--- a/third_party/binutils/upload.sh
+++ b/third_party/binutils/upload.sh
@@ -5,21 +5,61 @@
# Upload the generated output to Google storage.
-if [ ! -d $1 ]; then
+set -e
+
+if [ ! -d "$1" ]; then
echo "update.sh <output directory from build-all.sh>"
exit 1
fi
-if [ ! -f ~/.boto ]; then
- echo "You need to run 'gsutil config' to set up authentication before running this script."
+if echo "$PWD" | grep -qE "/src/third_party/binutils$"; then
+ echo -n
+else
+ echo "update.sh should be run in src/third_party/binutils"
exit 1
fi
-BINUTILS_TAR_BZ2=linux/binutils.tar.bz2
-if [ -f ${BINUTILS_TAR_BZ2}.sha1 ]; then
- echo "Please remove ${BINUTILS_TAR_BZ2}.sha1 before starting..."
+if [ ! -f ~/.boto ]; then
+ echo "You need to run 'gsutil config' to set up authentication before running this script."
exit 1
fi
-(cd $1/; tar -jcvf ../$BINUTILS_TAR_BZ2 .)
-../depot_tools/upload_to_google_storage.py --bucket chromium-binutils $BINUTILS_TAR_BZ2
+for DIR in $1/*; do
+ # Skip if not directory
+ if [ ! -d "$DIR" ]; then
+ continue
+ fi
+
+ case "$DIR" in
+ */i686-pc-linux-gnu)
+ export ARCH="Linux_ia32"
+ ;;
+
+ */x86_64-unknown-linux-gnu)
+ export ARCH="Linux_x64"
+ ;;
+
+ *)
+ echo "Unknown architecture directory $DIR"
+ exit 1
+ ;;
+ esac
+
+ if [ ! -d "$ARCH" ]; then
+ mkdir -p "$ARCH"
+ fi
+
+ 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"
+ fi
+ (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"
+done
+
+echo "Please commit the new .sha1 to the Chromium repository"
+echo ""
+echo "# git commit"
« no previous file with comments | « third_party/binutils/linux/.keepme ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698