diff options
-rwxr-xr-x | scripts/scripts/git-new-repo | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/scripts/git-new-repo b/scripts/scripts/git-new-repo index 9d87310..baf1155 100755 --- a/scripts/scripts/git-new-repo +++ b/scripts/scripts/git-new-repo | |||
@@ -1,6 +1,12 @@ | |||
1 | #! /usr/bin/env bash | 1 | #! /usr/bin/env bash |
2 | 2 | ||
3 | repo=${1:-$(basename $(pwd)).git}; | 3 | if [ $# -eq 0 ]; then |
4 | ssh git@ferrn git init --bare "$repo"; | 4 | echo "requires an arg" |
5 | git remote add origin git@ferrn:"$repo"; | 5 | exit 1 |
6 | fi | ||
7 | |||
8 | # $1 - section/repo-name | ||
9 | |||
10 | ssh git@ferrn git init --bare "$1"; | ||
11 | git remote add origin git@ferrn:"$1"; | ||
6 | git push -u origin HEAD; | 12 | git push -u origin HEAD; |