OLD | NEW |
(Empty) | |
| 1 #!/bin/bash -e |
| 2 |
| 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 # |
| 7 # Script to install dependencies for developing Mojo on Mac OS X. |
| 8 |
| 9 XCODE_APP="/Applications/Xcode.app" |
| 10 JDK_VERSION="1.7.0" |
| 11 |
| 12 echo |
| 13 |
| 14 INSTRUCTIONS="" |
| 15 |
| 16 if [ ! -d $XCODE_APP ]; then |
| 17 INSTRUCTIONS="${INSTRUCTIONS}\n** Install the latest version of Xcode from the
Mac App Store." |
| 18 fi |
| 19 |
| 20 if [ -z $(which java) ] || ! java -version 2>&1 | grep -q ${JDK_VERSION}; then |
| 21 temp=$( |
| 22 echo "** Download the Java JDK (Java SE Development Kit) 7:" |
| 23 echo " http://www.oracle.com/technetwork/java/javase/downloads/jdk7-download
s-1880260.html" |
| 24 ) |
| 25 |
| 26 INSTRUCTIONS="${INSTRUCTIONS}\n$temp" |
| 27 fi |
| 28 |
| 29 |
| 30 if [ -z $(which gclient) ] && [ ! -d $HOME/depot_tools ]; then |
| 31 echo "*** Installing depot_tools in $HOME" |
| 32 echo |
| 33 cd $HOME |
| 34 git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 35 |
| 36 temp=$( |
| 37 echo "** Add this to your .bash_profile or similar:" |
| 38 echo " export PATH=\"\${HOME}/depot_tools:\${PATH}\"" |
| 39 ) |
| 40 |
| 41 INSTRUCTIONS="${INSTRUCTIONS}\n$temp" |
| 42 fi |
| 43 |
| 44 if [ ! -z $(which brew) ]; then |
| 45 brew install ant |
| 46 elif [ ! -z $(which port) ]; then |
| 47 sudo `which port` install apache-ant |
| 48 else |
| 49 INSTRUCTIONS="${INSTRUCTIONS}\n** Install homebrew (brew.sh) or macports (macp
orts.org) and re-run this script." |
| 50 fi |
| 51 |
| 52 sudo easy_install pip |
| 53 sudo pip install requests |
| 54 |
| 55 |
| 56 echo |
| 57 echo "All done!" |
| 58 |
| 59 if [ ! -z "$INSTRUCTIONS" ]; then |
| 60 echo |
| 61 echo |
| 62 echo "**** Follow these final instructions to get going." |
| 63 echo $INSTRUCTIONS |
| 64 fi |
OLD | NEW |