]> apps.delaporte.us Git - dotfiles.git/blob - bootstrap.sh
Cleanup unused files.
[dotfiles.git] / bootstrap.sh
1 # Reminder to future self:
2 # Step 1: ssh-keygen on remote host.
3 # Step 0: Remove any existing .vim, .vimrc and .zsrhrc on remote host.
4 # Step 2: Add ssh pubkey to GitHub as deploy key.
5 # Step 3: clone the repo.
6 # Step 4: Run this bootstrap script.
7
8 # You can scp just this file to the destination host,
9 # and then run it.
10
11 ## Setup Git and Vim
12 if [ ! -d ~/dotfiles ]; then
13 sudo apt-get install git install vim
14 # TODO: Consider vim-nox to resolve 'needs python' error from some of my vundle plugins.
15 git config --global user.email "edward@delaporte.us"
16 git config --global user.name "Edward Delaporte"
17 git config --global core.editor /usr/bin/vim
18 cd ~; git clone git@github.com:edthedev/dotfiles.git
19 fi
20 if [ ! -f ~/.vimrc ]; then
21 ln -s ~/dotfiles/vimrc ~/.vimrc
22 fi
23
24
25 ## Setup PowerShell
26 if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
27 sudo apt-get install powershell
28 chsh --shell /usr/bin/pwsh
29 mkdir -p /home/delaport/.config/powershell/
30 ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
31 fi
32
33 ## Create SSH Keys
34 if [ ! -f ~/.ssh/id_rsa ]; then
35 ssh-keygen
36 fi
37
38 ## Setup Remote Access
39 # if [ ! -f ~/id_rsa.pub ]; then
40 # cp ~/dotfiles/id_rsa.pub ~/id_rsa.pub
41 # chmod go+r ~/id_rsa.pub
42 # fi
43
44 ## Setup ZShell Profile
45 # if [ ! -f ~/.zshrc ]; then
46 # ln -s ~/dotfiles/zshrc ~/.zshrc
47 # fi
48 # if [ ! -f ~/dotfiles/antigen/README.md ]; then
49 # cd ~/dotfiles;git submodule update --init
50 # fi
51
52 ## Setup Screen
53 if [ ! -f ~/.screenrc ]; then
54 sudo apt-get install screen
55 ln -s ~/dotfiles/screenrc ~/.screenrc
56 fi
57
58 ## Setup Vundle for Vim
59 if [ ! -d ~/.vim/bundle ]; then
60 echo "*** Setup Vundle for Vim***"
61 git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
62
63 sudo apt-get install vim-gtk3 # For python support
64 sudo update-alternatives --set editor /usr/bin/vim.gtk3
65 sudo update-alternatives --set vim /usr/bin/vim.gtk3
66 sudo update-alternatives --set vi /usr/bin/vim.gtk3
67
68 vim +BundleInstall +qall
69
70 fi
71
72 # Vim-Plu
73 curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
74 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim