Revision control

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