-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·79 lines (61 loc) · 1.93 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
#!/usr/bin/env bash
if [ -z "$HOME" ]; then echo "Seems you're \$HOMEless :("; exit 1; fi
DOTFILES=$HOME/.dotfiles
DOTFZF=$HOME/.fzf
DOTLOCAL=$HOME/.local/share/dotfiles
GITCLONE="git clone --depth=1"
cd "$HOME" || exit
rm -rf "$DOTFILES"
mkdir "$DOTFILES"
cd "$DOTFILES" || exit
git init
git remote add origin https://github.com/tylersmalley/dotfiles.git
git pull origin master
# Swap origin so I can make edits easily
git remote rm origin
git remote add origin [email protected]:tylersmalley/dotfiles.git
rm -rf \
"$DOTFZF" \
"$DOTLOCAL" \
"$HOME/.bashrc" \
"$HOME/.gitconfig" \
"$HOME/.vim" \
"$HOME/.vimrc" \
"$HOME/.zshrc" \
"$HOME/.oh-my-zsh"
mkdir -p \
"$DOTLOCAL" \
"$HOME/.local/share/vim/{swap,undo}" \
"$HOME/.vim/colors" \
"$HOME/.vim/pack/plugins/start"
ln -s "$DOTFILES/bashrc" "$HOME/.bashrc"
ln -s "$DOTFILES/gitconfig" "$HOME/.gitconfig"
ln -s "$DOTFILES/vimrc" "$HOME/.vimrc"
ln -s "$DOTFILES/zshrc" "$HOME/.zshrc"
$GITCLONE https://github.com/robbyrussell/oh-my-zsh.git "$HOME/.oh-my-zsh"
# $GITCLONE https://github.com/junegunn/fzf.git "$DOTFZF"
# "$DOTFZF/install" --key-bindings --completion --no-update-rc
ZSHPLUGS=(
"zsh-autosuggestions"
)
for INDEX in ${!ZSHPLUGS[*]}; do
ZSHPLUG="${ZSHPLUGS[$INDEX]}"
$GITCLONE "https://github.com/zsh-users/$ZSHPLUG.git" "$HOME/.oh-my-zsh/custom/plugins/$ZSHPLUG"
done
# VIMPLUGS=(
# "w0rp/ale"
# "editorconfig/editorconfig-vim"
# "junegunn/fzf.vim"
# "sheerun/vim-polyglot"
# "jelera/vim-javascript-syntax"
# "Quramy/vim-js-pretty-template"
# "StanAngeloff/php.vim"
# )
# 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
wget https://raw.githubusercontent.com/altercation/vim-colors-solarized/master/colors/solarized.vim -P "$HOME/.vim/colors/"
# cd "$HOME" || exit
# rm -f "${HOME}/.zcompdump*"