-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize.sh
executable file
·50 lines (37 loc) · 1.63 KB
/
initialize.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
#!/bin/zsh
# 未定義な変数があったら途中で終了する
set -u
# 今のディレクトリ
# dotfilesディレクトリに移動する
BASEDIR=$(dirname $0)
cd $BASEDIR
chmod g-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
### Homebrew
# dotfilesディレクトリにある、ドットから始まり2文字以上の名前のファイルに対して
for f in .??*; do
[ "$f" = ".git" ] && continue
[ "$f" = ".gitmodules" ] && continue
[ "$f" = ".DS_Store" ] && continue
# シンボリックリンクを貼る
ln -snfv ${PWD}/"$f" ~
done
# スクリーンショットの撮影時に影を含めない
defaults write com.apple.screencapture disable-shadow -bool true
# Finderで隠しファイルを表示する
defaults write com.apple.finder AppleShowAllFiles -bool true
# Xcodeでビルドにかかった時間を表示する
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool true
# シミュレータにタップジェスチャーを表示する
defaults write com.apple.iphonesimulator ShowSingleTouches 1
# Swiftプロジェクトのビルドを速くする
defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
# SystemUIServerを再起動して設定を反映させる
killall SystemUIServer
# Homebrewをインストールする
# ref: https://docs.brew.sh/Installation
which brew >/dev/null 2>&1 || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
source ~/.zshrc
# Homebrewで管理しているパッケージをインストールする
# ref: https://tech.gootablog.com/article/homebrew-brewfile/
brew bundle
source ~/.zshrc