-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·50 lines (40 loc) · 1.1 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
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
function command_exists {
command -v "$1" > /dev/null;
}
# cocoaPods
if ! command_exists rbenv ; then
brew install rbenv
brew install ruby-build
rbenv --version
rbenv install -l
ruby_latest=$(rbenv install -l | grep -v '[a-z]' | tail -1 | sed 's/ //g')
rbenv install $ruby_latest
rbenv local $ruby_latest
rbenv rehash
ruby -v
fi
# SwiftLint
if ! command_exists swiftlint ; then
brew install swiftlint
fi
# SwiftGen
if ! command_exists swiftgen ; then
brew install swiftgen
fi
# Bundler
if ! command_exists bundler ; then
gem install bundler
fi
bundle install --path=vendor/bundle
bundle exec pod repo update
bundle exec pod install
# View build time setting
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
# Compile num setting
cores=$(system_profiler SPHardwareDataType | grep 'Total Number of Cores:' | sed -e 's/.*Cores: \([0-9]*\).*/\1/')
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `expr $cores \* 2`
# Tuning Xcode
git clone [email protected]:AkkeyLab/TuningXcode.git
mv TuningXcode/TuningXcode.app ./
rm -rf TuningXcode