@@ 1,4 1,4 @@
-#!/usr/local/bin/bash
+#!/usr/bin/env bash
logt () {
echo "##### $text #####"
@@ 9,16 9,22 @@ text=""
if [ ! -f ~/.ssh/id_rsa.pub ]; then
text='Generating SSH Key'
logt
- ssh -t RSA -b 4096 -C "zah@andrewzah.com"
+ ssh-keygen -t RSA -b 4096 -C "zah@andrewzah.com"
- echo '!!! Pause and upload ssh key to git.sr.ht before continuing.'
- exit 0
+ text='Setting ~/.ssh permissions'
+ logt
+ touch ~/.ssh/authorized_keys
+ chmod 700 ~/.ssh
+ chmod 644 ~/.ssh/id_rsa.pub
+ chmod 0600 ~/.ssh/id_rsa ~/.ssh/authorized_keys
+
+ echo '!!! Dont forget to upload new ssh key to git repo for dotfiles later.'
fi
if [ ! -d ~/.dotfiles ]; then
text='Cloning dotfiles'
logt
- git clone git@git.sr.ht:~andrewzah/dotfiles ~/.dotfiles
+ git clone -b openbsd-x220 'https://git.sr.ht/~andrewzah/dotfiles' ~/.dotfiles
fi
if [ ! -d ~/.oh-my-zsh ]; then
@@ 26,7 32,7 @@ if [ ! -d ~/.oh-my-zsh ]; then
logt
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- echo 'Downloading Oh-My-Zsh'
+ echo 'Removing default zshrc'
rm ~/.zshrc
ln -s ~/.dotfiles/.zshrc ~/.zshrc
fi