-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.fish
executable file
·60 lines (41 loc) · 1.08 KB
/
setup.fish
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
#!/usr/bin/env fish
for cmd in git curl
if not type -q $cmd
echo $cmd "is required."; exit 1
end
end
set DOT_PATH $HOME/.dotfiles
if not test -d $DOT_PATH
git clone [email protected]:hayashikun/dotfiles.git $DOT_PATH
end
cd $DOT_PATH
source init.fish
set -e fish_user_paths[0..-1]
link-file .gitconfig .config/git/ignore .config/fish/config.fish .config/fish/fish_plugins
source-config
# make chache dir
if not test -d $CACHE_PATH
mkdir $CACHE_PATH
end
brew-install jq pwgen gdb tree gpg gh git-lfs
apt-install xclip jq pwgen gdb lldb tree
# fisher
if not test -e $HOME/.config/fish/functions/fisher.fish
curl -sL https://git.io/fisher | source
end
fisher install (cat $DOT_PATH/.config/fish/fish_plugins)
# powerline
cd $CACHE_PATH
if not test -e $CACHE_PATH/font
git clone https://github.com/powerline/fonts.git --depth=1
end
cd fonts && git pull && ./install.sh
# target
set TARGETS vim python rust node go
if test -f $DOT_PATH/.target
set TARGETS (cat $DOT_PATH/.target)
end
for t in $TARGETS
cd $DOT_PATH && source setup-$t.fish
end
source-config