-
Notifications
You must be signed in to change notification settings - Fork 1
/
init_darwin.sh
executable file
·116 lines (96 loc) · 1.92 KB
/
init_darwin.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
set -ue
echo 'You should instal Xcode. Ready? [y(es)/n(o)]'
while read LINE; do
case "$LINE" in
y*) break ;;
n*) exit 1 ;;
esac
done
if ! brew -v > /dev/null; then
echo 'install homebrew'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# ディレクトリ名を英語化する
dirs=(~/Desktop ~/Documents ~/Downloads ~/Library ~/Library/Favorites ~/Movies ~/Music ~/Pictures ~/Public /Applications ~/Applications)
for d in ${dirs[@]}
do
pushd $d > /dev/null
[ -e .localized ] && [ ! -e .localized.disable ] && mv .localized .localized.disable
popd > /dev/null
done
mkdir -p ~/.vim_backup
mkdir -p ~/bin
mkdir -p ~/.config
mkdir -p "$XDG_CONFIG_HOME/git"
# 設定ファイル類の準備
DOT_FILES=(.gemrc .gitconfig .gvimrc .irbrc .tmux.conf .vim .vimrc .vrapperrc .zshrc .my.cnf .emacs.d)
for file in "${DOT_FILES[@]}"
do
[ ! -e "$HOME/$file" ] && ln -s "$HOME/dotfiles/$file" "$HOME"
done
[ ! -e "$XDG_CONFIG_HOME/git/ignore" ] && ln -s "$HOME/dotfiles/ignore" "$XDG_CONFIG_HOME/git/ignore"
[ ! -e "$HOME/.config/nvim" ] && ln -s "$HOME/dotfiles/.vim" "$HOME/.config/nvim"
git submodule init
git submodule update
brew update
brew install vim
brew install yarn --ignore-dependencies
apps=(
asdf
bat
clang-format
colordiff
ctags
direnv
exa
ghq
git
gnu-sed
gnutls
go
graphviz
jq
mkcert
nkf
nmap
peco
python3
reattach-to-user-namespace
rlwrap
shellcheck
sl
terminal-notifier
the_silver_searcher
tig
tmux
tree
w3m
watch
wget
zsh
zsh-completions
zsh-syntax-highlighting
anyenv
)
for app in ${apps[@]}
do
brew install $app
done
# google-chrome
# virtualbox
casks=(
alfred
appcleaner
google-japanese-ime
iterm2
karabiner-elements
keyboardcleantool
virtualbox
visual-studio-code
)
for cask in ${casks[@]}
do
brew cask install $cask
done
go get -u github.com/motemen/ghq