~andrewzah/dotfiles

ref: 86dfc884e3dde0a5a5beb72edfcc61380140972c dotfiles/scripts/new-install.sh -rwxr-xr-x 908 bytes
86dfc884Andrew Zah update 2 years ago
                                                                                
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
#!/usr/local/bin/bash

logt () {
  echo "##### $text #####"
}

text=""

if [ ! -f ~/.ssh/id_rsa.pub ]; then
  text='Generating SSH Key'
  logt
  ssh -t RSA -b 4096 -C "zah@andrewzah.com"

  echo '!!! Pause and upload ssh key to git.sr.ht before continuing.'
  exit 0
fi

if [ ! -d ~/.dotfiles ]; then
  text='Cloning dotfiles'
  logt
  git clone git@git.sr.ht:~andrewzah/dotfiles ~/.dotfiles
fi

if [ ! -d ~/.oh-my-zsh ]; then
  text='Downloading Oh-My-Zsh'
  logt
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

  echo 'Downloading Oh-My-Zsh'
  rm ~/.zshrc
  ln -s ~/.dotfiles/.zshrc ~/.zshrc
fi

if [ ! -f ~/.local/share/nvim/site/autoload/plug.vim ]; then
  text='Downloading Plug for Neovim'
  logt

  curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi