forked from CocoaHeadsBrasil/CocoaHeadsApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·39 lines (33 loc) · 1.12 KB
/
setup.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
#!/bin/bash
# Tells the shell script to exit if it encounters an error
set -e
# -- Log -----------------------------------------------------------------------
function msg { echo "\033[0;37m$1\033[0m"; }
function msg_ok { echo "➜\033[1;32m $1 ✔\033[0m"; }
function msg_run { echo "➜\033[1;35m $1 $ $2\033[0m"; }
# -- Dependencies --------------------------------------------------------------
msg "Instaling Bundler!"
if which ruby &> /dev/null; then
msg_run "bundler" "sudo gem install bundler"
sudo gem install bundler
else
msg_run "bundler" "gem install bundler"
gem install bundler
fi
msg "Installing Homebrew!"
if which brew &> /dev/null; then
msg_ok "homebrew"
else
msg_run "homebrew" "/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)""
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
msg "Instaling/Updating Swiftlint"
which -s swiftlint
if [[ $? != 1 ]] ; then
msg_ok "swiftlint"
else
msg_run "swiftlint" "brew install swiftlint"
brew install swiftlint
fi
msg "Executing CocoaPods"
bundle exec pod install