Created
February 26, 2015 23:54
-
-
Save amercier/e7fd4c8e739357663591 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if [ "$(which git) 2>/dev/null" = "" ]; then | |
echo "git is not installed. Please install git" >&2 \ | |
&& exit 1 | |
fi | |
if [ ! -e .ssh/id_rsa.pub ]; then | |
echo "SSH public key not found in .ssh/, creating..." \ | |
&& ssh-keygen -t rsa -C "[email protected]" \ | |
&& echo "Add the following key to https://github.com/settings/ssh" \ | |
&& cat .ssh/id_rsa.pub \ | |
&& exit | |
fi | |
cd \ | |
&& git init \ | |
&& git remote add -t \* -f origin [email protected]:amercier/dotfiles.git \ | |
&& git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment