Skip to content

Commit

Permalink
Obtain gsutil from the web
Browse files Browse the repository at this point in the history
  • Loading branch information
colinblundell committed Nov 4, 2014
1 parent f58ba62 commit b5b537d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Thumbs.db
/out
/out_*
/testing
/third_party/gsutil
/third_party/jinja2
/third_party/markupsafe
/third_party/ninja
Expand Down
6 changes: 5 additions & 1 deletion build/install-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ git clone https://chromium.googlesource.com/external/googletest.git $GTEST_DIR
cd $GTEST_DIR
git checkout 4650552ff637bb44ecf7784060091cbed3252211 # from svn revision 692

cd $ROOT_DIR
# Install gsutil.
cd $THIRD_PARTY_DIR
curl --remote-name https://storage.googleapis.com/pub/gsutil.tar.gz
tar xfz gsutil.tar.gz
rm gsutil.tar.gz

# Download and extract PLY.
# Homepage:
Expand Down
9 changes: 2 additions & 7 deletions mojo/public/tools/download_shell_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
import zipfile

current_path = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(current_path, "..", "..", "..", "tools"))
# pylint: disable=F0401
import find_depot_tools

if not sys.platform.startswith("linux"):
print "Not supported for your platform"
Expand All @@ -38,12 +35,10 @@

gs_path = "gs://mojo/shell/" + version + "/" + basename

depot_tools_path = find_depot_tools.add_depot_tools_to_path()
gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil")
gsutil_exe = os.path.join(current_path, "..", "..", "..", "third_party", "gsutil", "gsutil")

with tempfile.NamedTemporaryFile() as temp_zip_file:
subprocess.check_call([gsutil_exe, "--bypass_prodaccess",
"cp", gs_path, temp_zip_file.name])
subprocess.check_call([gsutil_exe, "cp", gs_path, temp_zip_file.name])
with zipfile.ZipFile(temp_zip_file.name) as z:
zi = z.getinfo("mojo_shell")
mode = zi.external_attr >> 16L
Expand Down

0 comments on commit b5b537d

Please sign in to comment.