From ee5fd2f9d8d42194c290fc16cd8d5c3fd8779650 Mon Sep 17 00:00:00 2001 From: Jon Yurek Date: Wed, 1 Jun 2011 11:56:27 -0400 Subject: [PATCH] Generate SSH keys if you don't have them. --- mac | 7 ++++++- ubuntu | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mac b/mac index 1e37b8385..58a1793ee 100644 --- a/mac +++ b/mac @@ -1,11 +1,16 @@ #!/usr/bin/env bash +echo "Checking for SSH key, generating one if it exists ..." + [[ -f ~/.ssh/id_rsa.pub || -f ~/.ssh/id_dsa.pub ]] || ssh-keygen -t rsa + echo "Copying public key to clipboard. Paste it into your Github account ..." - cat ~/.ssh/id_rsa.pub | pbcopy + [[ -f ~/.ssh/id_dsa.pub ]] && cat ~/.ssh/id_dsa.pub | pbcopy + [[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy open https://github.com/account/ssh echo "Installing Homebrew, a great OS X package manager ..." ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)" + brew update echo "Installing git for version control ..." brew install git diff --git a/ubuntu b/ubuntu index 8a3d37ccc..bd011dacd 100644 --- a/ubuntu +++ b/ubuntu @@ -1,7 +1,11 @@ #!/usr/bin/env bash +echo "Checking for SSH key, generating one if it exists ..." + [[ -f ~/.ssh/id_rsa.pub || -f ~/.ssh/id_dsa.pub ]] || ssh-keygen -t rsa + echo "Copying public key to clipboard. Paste it into your Github account ..." - cat ~/.ssh/id_rsa.pub | xclip + [[ -f ~/.ssh/id_dsa.pub ]] && cat ~/.ssh/id_dsa.pub | xclip + [[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | xclip open https://github.com/account/ssh echo "Using apt-get to install OS packages so let's update it first ..."