Created
March 3, 2017 21:31
-
-
Save zikes/926fd8bb72f9856776e309fba45f07cc 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 bash | |
usage() { | |
cat <<HERE | |
usage: git make-remote <project-name> | |
or: git make-remote <path/to/project-name> | |
HERE | |
} | |
GIT_SERVER="git.zikes.me" | |
GIT_USER="git" | |
case $# in | |
1) | |
ssh $GIT_USER@$GIT_SERVER "mkdir -p $1.git && cd $1.git && git init --bare" | |
git remote add origin $GIT_USER@$GIT_SERVER:$1.git | |
exit 0 | |
;; | |
*) | |
usage && exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment