]> apps.delaporte.us Git - dotfiles.git/blob - bootstrap_pi.sh
Move minion commands into minion library.
[dotfiles.git] / bootstrap_pi.sh
1 # Reminder to future self:
2 # Step 0: git clone https://github.com/edthedev/dotfiles
3 # Step 1: Run this bootstrap script.
4
5 echo "Git, vi are already installed."
6
7 mkdir -p ~/.installed
8
9 if [ ! -d ~/dotfiles ]; then
10 echo "************** Setup Git and Vim"
11 sudo apt-get install git vim-nox
12 cd ~; git clone git@github.com:edthedev/dotfiles.git
13 fi
14
15 # sudo apt-get install vim-nox
16
17 if [ ! -f ~/.vimrc ]; then
18 echo "************** Configure Git and link Vimrc"
19 git config --global user.email "edward@delaporte.us"
20 git config --global user.name "Edward Delaporte"
21 git config --global core.editor /usr/bin/vim
22 ln -s ~/dotfiles/vimrc ~/.vimrc
23 fi
24
25 if [ ! -f ~/.installed/i3 ]; then
26 echo "************** Install i3 Window Manager"
27 sudo apt-get install i3
28 touch ~/.installed/i3
29 fi
30
31 ## Setup PowerShell
32 if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
33 echo "************** Install PowerShell and setup profile"
34 sudo apt-get install powershell
35 chsh --shell /usr/bin/pwsh
36 mkdir -p ~/.config/powershell/
37 ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
38 fi
39
40 ## Create SSH Keys
41 if [ ! -f ~/.ssh/id_rsa ]; then
42 echo "************** Generate an SSH key"
43 ssh-keygen
44 fi
45
46 ## Setup Remote Access
47 # if [ ! -f ~/id_rsa.pub ]; then
48 # cp ~/dotfiles/id_rsa.pub ~/id_rsa.pub
49 # chmod go+r ~/id_rsa.pub
50 # fi
51
52 ## Setup Screen
53 if [ ! -f ~/.screenrc ]; then
54 echo "************** Install Screen"
55 sudo apt-get install screen
56 ln -s ~/dotfiles/screenrc ~/.screenrc
57 fi
58
59 ## Setup Vundle for Vim
60 if [ ! -d ~/.vim/bundle ]; then
61 echo "************** Setup Vundle for Vim"
62 git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
63 vim +BundleInstall +qall
64 fi
65
66 if [ ! -d ~/.installed/code ]; then
67 echo "************** Install Visual Studio Code"
68 # sudo apt install snapd
69 # sudo snap install --classic code
70 wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add -
71 curl -L https://raw.githubusercontent.com/headmelted/codebuilds/master/docs/installers/apt.sh | sudo bash
72 touch ~/.installed/code
73 fi
74
75 echo "https://github.com/settings/keys"
76 echo "vim .git/config -- add: url = git@github.com:edthedev/dotfiles.git"
77 cat ~/.ssh/id_rsa.pub
78
79 ls -al ~/.installed