Permalink
Browse files

Add download-blobs.sh script

  • Loading branch information...
1 parent 8207a5a commit c1c7a80accf3d6d50bec6b3ea92ccc0d1aa35b73 @michaelwu michaelwu committed Jun 13, 2012
Showing with 60 additions and 0 deletions.
  1. +5 −0 blob-shasums
  2. +46 −0 download-blobs.sh
  3. +9 −0 extract.rc
View
@@ -0,0 +1,5 @@
+eb2a669d63c32741faf6e490f4ab2bf3b85c99b5 ?akm-crespo-imm76d-8314bd5a.tgz
+b64c6655c579417bdf3426d71d6cf50c59b95818 ?broadcom-crespo-imm76d-a794e660.tgz
+e96ea011060e913acd3d20ede7b3323f4d3c52aa ?imgtec-crespo-imm76d-d381b3bf.tgz
+2f25e085b3c6fb4a57e764af70c065d64769875e ?nxp-crespo-imm76d-d3862877.tgz
+49c52759cfacde9c8258a06f4c76a79b08f68e71 ?samsung-crespo-imm76d-d2d82200.tgz
View
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Copyright (C) 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+EXTRACT_RC="$PWD/extract.rc"
+
+install_blobs() {
+ mkdir -p download-$1 &&
+ (cd download-$1 && shasum -p -c $3) ||
+ for BLOB in $2 ; do
+ rm -f download-$1/$BLOB &&
+ curl https://dl.google.com/dl/android/aosp/$BLOB -o download-$1/$BLOB ||
+ exit -1
+ done &&
+ (cd download-$1 && shasum -p -c $3) &&
+ for BLOB in $2 ; do
+ tar xvfz download-$1/$BLOB -C download-$1 ||
+ exit -1
+ done &&
+ for BLOB_SH in download-$1/extract-*.sh ; do
+ BASH_ENV="$EXTRACT_RC" bash $BLOB_SH
+ done
+}
+
+CRESPO_BLOBS="akm-crespo-imm76d-8314bd5a.tgz
+ broadcom-crespo-imm76d-a794e660.tgz
+ imgtec-crespo-imm76d-d381b3bf.tgz
+ nxp-crespo-imm76d-d3862877.tgz
+ samsung-crespo-imm76d-d2d82200.tgz"
+
+CSUM_LIST="$PWD/blob-shasums"
+
+cd ../../.. &&
+install_blobs nexus-s "$CRESPO_BLOBS" "$CSUM_LIST"
View
@@ -0,0 +1,9 @@
+
+more() {
+ return 0
+}
+
+read() {
+ typed="I ACCEPT"
+}
+

0 comments on commit c1c7a80

Please sign in to comment.