-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·47 lines (40 loc) · 1.01 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
#!/bin/sh
# dotfilesのPATHを取得
CURRENT=$(cd $(dirname $0) && pwd)
# ディレクトリ作成
if [ ! -d ~/bin/ ]
then
mkdir ~/bin/
fi
if [ ! -d ~/.zsh/ ]
then
mkdir ~/.zsh/
fi
if [ ! -d ~/.config/nvim/ ]
then
mkdir -p ~/.config/nvim/
fi
# シンボリックリンク
ln -sf ${CURRENT}/.bash/.bash_profile ~
ln -sf ${CURRENT}/.vim/.vimrc ~
ln -sf ${CURRENT}/nvim/init.vim ~/.config/nvim/
ln -sf ${CURRENT}/.gitconfig ~
ln -sf ${CURRENT}/.agignore ~
ln -sf ${CURRENT}/bin/git_diff_wrapper ~/bin/
ln -sf ${CURRENT}/.zsh/.zshenv ~/.zsh/
ln -sf ${CURRENT}/.zsh/.zshrc ~/.zsh/
# OS毎のバイナリ配置
case ${OSTYPE} in
darwin*)
# Mac用のバイナリ
ln -sf ${CURRENT}/bin/mac/exa ~/bin/
ln -sf ${CURRENT}/bin/mac/fzf ~/bin/
;;
linux*)
# Linux用のバイナリ
ln -sf ${CURRENT}/bin/linux/exa ~/bin/
ln -sf ${CURRENT}/bin/linux/jq ~/bin/
ln -sf ${CURRENT}/bin/linux/fzf ~/bin/
ln -sf ${CURRENT}/bin/linux/ag ~/bin/
;;
esac