-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·113 lines (90 loc) · 2.64 KB
/
install.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
#!/usr/bin/env sh
dotfiles=$HOME/.dotfiles
zsh_dir=$dotfiles/.zsh
zshrc=$dotfiles/.zshrc
fzf_dir=$HOME/.fzf
zlogin=$dotfiles/.zlogin
vimrc=$dotfiles/.vimrc
vim_dir=$dotfiles/.vim
tmux_conf=$dotfiles/.tmux/.tmux.conf
xresources=$dotfiles/.Xresources
gitignore=$dotfiles/.gitignore
echo "Installing/Updating dotfiles...\n"
if [ ! -e $dotfiles/.git ]; then
echo "Cloning dotfiles\n"
git clone https://github.com/network-shark/.dotfiles.git $dotfiles
else
echo "Updating dotfiles\n"
cd $dotfiles && git pull
echo "Download & Update Submodules\n"
cd $dotfiles && git submodule init && git submodule update
fi
echo "Creating Symlinks in $HOME environment"
## ZSH
[ ! -d $HOME/.zsh ] && ln -s $zsh_dir $HOME/.zsh \
|| echo ".zsh already exists..."
[ ! -e $HOME/.zshrc ] && ln -s $zshrc $HOME/.zshrc \
|| echo ".zshrc already exists..."
[ ! -e $HOME/.zlogin ] && ln -s $zlogin $HOME/.zlogin \
|| echo ".zlogin already exists..."
## VIM
[ ! -d $HOME/.vim ] && ln -s $vim_dir $HOME/.vim \
|| echo ".vim already exists..."
[ ! -e $HOME/.vimrc ] && ln -s $vimrc $HOME/.vimrc \
|| echo ".vimrc already exists..."
## TMUX
[ ! -e $HOME/.tmux.conf ] && ln -s $tmux_conf $HOME/.tmux.conf \
|| echo ".tmux.conf already exists..."
## OSC 52 Clipboard
[ ! -e $HOME/.Xresources ] && ln -s $xresources $HOME/.Xresources \
|| echo ".Xresources already exists..."
#FZF
if [ ! -d $fzf_dir ]; then
echo "Installing FZF"
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
yes | ~/.fzf/install
else
echo "FZF Alrady installed"
fi
#AG
if [ "$(which ag)" ]; then
echo "AG is installed"
else
echo "Error: Please install AG / the_silver_searcher"
echo "# Install Instructions https://github.com/ggreer/the_silver_searcher"
fi
echo "Install node and yarn"
echo "To get coc working in vim "
echo "cd ~/.vim/bundle/coc"
echo "yarn install"
echo "yarn build"
# ZSH Powerline
#if [ -e $HOME/.zsh/lib/powerline.zsh ]; then
# echo ".powerline.zsh already exists..."
#else
# powerline_zsh_path="$(find /usr/local/lib -name 'powerline.zsh' )"
# for word in $powerline_zsh_path
# do
# ln -s $word .zsh/lib/powerline.zsh
# echo ".powerline.zsh created"
# break
# done
#fi
## Powerline Conf
#if [ -e $HOME/.powerline.conf ]; then
# echo ".powerline.conf already exists..."
#else
# powerline_conf_path="$(find /usr/local/lib -name 'powerline.conf' )"
# for word in $powerline_conf_path
# do
# ln -s $word ~/.powerline.conf
# echo ".powerline.conf created"
# break
# done
#fi
# Powerline Local Config
#if [ -e $HOME/.config/powerline/config.json ]; then
# echo ".config already exists..."
#else
# ln -s $HOME/.dotfiles/.config $HOME/.config
#fi