-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·53 lines (40 loc) · 1022 Bytes
/
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
48
49
50
51
52
#!/bin/bash
WHERE=$1
if [ -z $1 ]; then
WHERE=$HOME
fi
echo Creating links in $WHERE
bkp_dir=.backup.dotfiles
dot_dir=$WHERE/.dotfiles
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
ZSH_CUSTOM=~/.oh-my-zsh/custom
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
mkdir -p $bkp_dir
files=(
"all_profile"
"bash_profile"
"bashrc"
"gitconfig"
"gitignore"
"gitmailmap"
"profile"
"vimrc"
"shellpaths"
"shellaliases"
"shellactivities"
"vim"
"tmux.conf"
"zshrc")
for file in "${files[@]}"
do
if [[ -L ".$file" ]]; then
echo $file is a symbolic link
else
echo Moving .$file
mv .$file $bkp_dir
ln -s $dot_dir/$file .$file
fi
done
vim +'PlugInstall --sync' +qa