blob: 625ddf4a648236d690891a908522f542b58fda3e [file] [log] [blame]
Gabe Schineacf4bd12015-06-18 14:18:46 -07001#!/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
9XCODE_APP="/Applications/Xcode.app"
10JDK_VERSION="1.7.0"
11
12echo
13
14INSTRUCTIONS=""
15
16if [ ! -d $XCODE_APP ]; then
17 INSTRUCTIONS="${INSTRUCTIONS}\n** Install the latest version of Xcode from the Mac App Store."
18fi
19
20if [ -z $(which java) ] || ! java -version 2>&1 | grep -q ${JDK_VERSION}; then
21 temp=$(
Gabe Schine8e6d3152015-06-19 11:45:12 -070022 echo "** Download the Java JDK (Java SE Development Kit) 7:"
23 echo " http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html"
Gabe Schineacf4bd12015-06-18 14:18:46 -070024 )
25
26 INSTRUCTIONS="${INSTRUCTIONS}\n$temp"
27fi
28
29
30if [ -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"
42fi
43
44if [ ! -z $(which brew) ]; then
45 brew install ant
46elif [ ! -z $(which port) ]; then
Tony Gentilcore6612b572015-07-06 08:08:31 -070047 sudo `which port` install apache-ant
Gabe Schineacf4bd12015-06-18 14:18:46 -070048else
49 INSTRUCTIONS="${INSTRUCTIONS}\n** Install homebrew (brew.sh) or macports (macports.org) and re-run this script."
50fi
51
52sudo easy_install pip
53sudo pip install requests
54
55
56echo
57echo "All done!"
58
59if [ ! -z "$INSTRUCTIONS" ]; then
60 echo
61 echo
62 echo "**** Follow these final instructions to get going."
63 echo $INSTRUCTIONS
Tony Gentilcore6612b572015-07-06 08:08:31 -070064fi