-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.mac.sh
77 lines (60 loc) · 1.48 KB
/
install.mac.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
#!/bin/sh
# -- Mac Install
START_TIME=$SECONDS
# CWD
DOTFILES_DIR="$( cd "$( dirname "${(%):-%x}" )" && pwd )"
echo ""
echo ""
echo ""
echo "----- Install tools for XCode -----"
if [[ ! -d "$('xcode-select' -print-path 2>/dev/null)" ]]; then
sudo xcode-select -switch /usr/bin
fi
echo ""
echo ""
echo ""
echo "----- Install gems -----"
sudo gem update --system
sudo gem install cocoapods
echo ""
echo ""
echo ""
echo "----- Install homebrew & cask -----"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew doctor
brew tap caskroom/cask
brew install brew-cask
echo ""
echo ""
echo ""
echo "----- Install brew's -----"
brew update
brew upgrade
brew install $(cat "$DOTFILES_DIR/Brewfile"|grep -v "#")
brew cleanup
local binroot="$(brew --config | awk '/HOMEBREW_PREFIX/ {print $2}')"/bin
echo ""
echo ""
echo ""
echo "----- Install app's from Cask -----"
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install $(cat "$DOTFILES_DIR/Caskfile"|grep -v "#")
qlmanage -r
chsh -s $(which zsh)
echo ""
echo ""
echo ""
echo "----- Generate directory structure -----"
mkdir -p ~/Works/graphic
mkdir -p ~/Works/dev
mkdir -p ~/Works/misc
mkdir -p ~/Works/resources
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo ""
echo ""
echo ""
echo "-----------------------------"
echo "----- Mac Install ended -----"
echo "-----------------------------"
echo "Duration : $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec"
echo "-------------------------"