-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
57 lines (44 loc) · 1.5 KB
/
bootstrap.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
echo "Starting setup..."
echo "Creating dirs..."
# Copy over bookmarks only if file doesn't exist
if [ ! -e "~/.shell_bookmarks" ]; then
printf "~/.shell_bookmarks not found! Creating...\n"
cp -n .shell_bookmarks ~
sed -i "s/\$USER/$(whoami)/g" ~/.shell_bookmarks
fi
mkdir -p ~/.config/vifm/colors
mkdir ~/dev
cp -R .vim ~/.vim
dotDir=~/dev/dotfiles/dot
dotfiles=`find $dotDir -type f -name ".*" -exec basename {} \;`
echo "Clearing and Symlinking...\n"
for dotfile in $dotfiles
do
rm -f ~/$dotfile
ln -sv $dotDir/$dotfile ~
done
if [ ! -d "~/.vim/autoload" ]; then
echo "getting vim plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
# Install oh-my-zsh
if ! echo "$ZSH" | grep -q "oh"; then
read -p "Do you want to install Oh My Zsh? (y/n): " choice
if [[ $choice == "y" || $choice == "Y" ]]; then
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
else
echo "oh-my-zsh already installed"
fi
# Install fzf
if [ -d ~/.fzf ]; then
echo "fzf already installed"
return
else
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
fi
echo "Finished setup..."