diff options
author | Akshay <[email protected]> | 2020-10-12 07:25:26 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-12 07:25:26 +0100 |
commit | 637ff790d30768f03274e2fef7310f8983338810 (patch) | |
tree | ad6c0491685f1989071e6b2e8ab28587d18a0315 | |
parent | 63a605fe09e1539a6d57c6232d7e7389fb9483f4 (diff) |
add err handles and section support
-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; |