Created
June 13, 2015 09:33
-
-
Save dronir/81ef5bef823123fd66ce to your computer and use it in GitHub Desktop.
This file contains 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
function make_remote | |
switch (count $argv) | |
case 0 | |
echo "Not enough arguments." | |
case 1 | |
set REPOPATH "git-repos/$argv[1].git" | |
_make_remote $REPOPATH | |
case 2 | |
set REPOPATH "git-repos/$argv[1].git" | |
_make_remote $REPOPATH | |
git remote add $argv[2] lakka:$REPOPATH | |
case '*' | |
echo "Too many arguments." | |
end | |
end | |
function _make_remote | |
ssh lakka "mkdir $argv[1] && cd $argv[1] && git init --bare" | |
echo "Created bare git repository lakka:$argv[1]" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment