forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_build_tools.sh
executable file
·99 lines (90 loc) · 1.92 KB
/
setup_build_tools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
#
# Install all the required dependencies for building and deploying Firefox for iOS
# Assumes you already have git otherwise you wouldn't have this setup script
#
# run ./setup.sh from the command line to run
#
#
# Check if XCode Command Line Tools are installed
#
which -s xcode-select
if [[ $? != 0 ]] ; then
echo "Installing XCode Command Line Tools"
# Install XCode Command Line Tools
xcode-select --install
else
echo "XCode Command Line Tools already installed"
fi
#
# Check if Homebrew is installed
#
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
echo "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "Homebrew already installed"
fi
#
# Check if python is installed
#
if [ ! -e $(python -c 'from distutils.sysconfig import get_makefile_filename as m; print m()') ]; then
# Install python
echo "Installing python"
brew install python
else
echo "python already installed"
fi
#
# Check if virtualenv is installed
#
which -s virtualenv
if [[ $? != 0 ]] ; then
# Install virtualenv
echo "Installing vitualenv"
pip install virtualenv
else
echo "virtualenv already installed"
fi
if [ ! -d /usr/local/Cellar/imagemagick ] ; then
echo "installing imagemagick"
brew install imagemagick
else
echo "imagemagick already installed"
fi
#
# Check if Carthage is installed
#
which -s carthage
if [[ $? != 0 ]] ; then
# Install Carthage
echo "Installing Carthage"
brew install carthage
else
echo "Carthage already installed"
fi
#
# Check if Node is installed
#
which -s node
if [[ $? != 0 ]] ; then
# Install Node
echo "Installing Node.js"
brew install node
else
echo "Node.js already installed"
fi
#
# Check if fastlane is installed
#
which -s fastlane
if [[ $? != 0 ]] ; then
# Install fastlane
echo "Installing fastlane."
sudo gem install fastlane
fastlane init
else
echo "fastlane already installed"
fi