aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-10-12 07:25:26 +0100
committerAkshay <[email protected]>2020-10-12 07:25:26 +0100
commit637ff790d30768f03274e2fef7310f8983338810 (patch)
treead6c0491685f1989071e6b2e8ab28587d18a0315
parent63a605fe09e1539a6d57c6232d7e7389fb9483f4 (diff)
add err handles and section support
-rwxr-xr-xscripts/scripts/git-new-repo12
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
3repo=${1:-$(basename $(pwd)).git}; 3if [ $# -eq 0 ]; then
4ssh [email protected] git init --bare "$repo"; 4 echo "requires an arg"
5git remote add origin [email protected]:"$repo"; 5 exit 1
6fi
7
8# $1 - section/repo-name
9
10ssh [email protected] git init --bare "$1";
11git remote add origin [email protected]:"$1";
6git push -u origin HEAD; 12git push -u origin HEAD;