-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·90 lines (70 loc) · 1.9 KB
/
install
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
#!/usr/bin/env bash
if [ -z "$HOME" ]; then
echo "Seems you're \$HOMEless :("; exit 1;
fi
DOTCONFIG=$HOME/.config
DOTFILES=$HOME/.dotfiles
DOTFZF=$HOME/.fzf
DOTZ=$HOME/.z
DOTLOCAL=$HOME/.local/share/dotfiles
mkdir -p "$DOTLOCAL"
cd "$HOME" || exit
rm -rf "$DOTFILES"
git clone [email protected]:mj111/dotfiles.git "$DOTFILES"
cd "$DOTFILES" || exit
rm -rf \
"$DOTCONFIG/nvim/init.vim" \
"$DOTFZF" \
"$DOTLOCAL" \
"$HOME/.bashrc" \
"$HOME/.gitconfig" \
"$HOME/.vim" \
"$HOME/.vimrc" \
"$HOME/.zshrc"
mkdir -p \
"$DOTCONFIG/"{gtk-3.0,nvim} \
"$DOTLOCAL" \
"$HOME/.local/share/vim/"{swap,undo} \
"$HOME/.themes/custom/gnome-shell" \
"$HOME/.vim/colors" \
"$HOME/.vim/pack/plugins/start"
ln -s "$DOTFILES/bashrc" "$HOME/.bashrc"
ln -s "$DOTFILES/gitconfig" "$HOME/.gitconfig"
ln -s "$DOTFILES/init.vim" "$DOTCONFIG/nvim/init.vim"
ln -s "$DOTFILES/vimrc" "$HOME/.vimrc"
ln -s "$DOTFILES/zshrc" "$HOME/.zshrc"
GITCLONE="git clone --depth=1"
$GITCLONE https://github.com/junegunn/fzf.git "$DOTFZF"
"$DOTFZF/install" --completion --no-update-rc
$GITCLONE https://github.com/rupa/z.git "$DOTZ"
ZSHPLUGS=(
"zsh-completions"
"zsh-history-substring-search"
"zsh-syntax-highlighting"
"zsh-autosuggestions"
)
for INDEX in ${!ZSHPLUGS[*]}; do
ZSHPLUG="${ZSHPLUGS[$INDEX]}"
$GITCLONE "https://github.com/zsh-users/$ZSHPLUG.git" "$DOTLOCAL/$ZSHPLUG"
done
VIMPLUGS=(
# File exploration and navigation
"junegunn/fzf.vim"
# Languages and syntax
"sheerun/vim-polyglot"
# Style guide and linting
"dense-analysis/ale"
"editorconfig/editorconfig-vim"
# TypeScript
"leafgarland/typescript-vim"
"Quramy/tsuquyomi"
)
for INDEX in ${!VIMPLUGS[*]}; do
VIMPLUG="${VIMPLUGS[$INDEX]}"
PLUGDIR=$(echo "$VIMPLUG" | cut -d '/' -f2)
$GITCLONE "https://github.com/$VIMPLUG.git" "$HOME/.vim/pack/plugins/start/$PLUGDIR"
done
cd "$HOME" || exit
rm -f "${HOME}/.zcompdump*"
echo
echo "ENJOY! :)"