summaryrefslogtreecommitdiff
path: root/bin/extra/dbnewg
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-01 23:26:28 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-01 23:27:19 +0200
commit4f8e2c1a36f85c55ca2bc190af9804c590ec7186 (patch)
treee26b793eec2ab3c77d4073de34d1f89dad4d359f /bin/extra/dbnewg
parentdad6249cae8d5d66e0a6b174ed30d78dbbb3a064 (diff)
added dbnewg
Diffstat (limited to 'bin/extra/dbnewg')
-rwxr-xr-xbin/extra/dbnewg11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/extra/dbnewg b/bin/extra/dbnewg
new file mode 100755
index 0000000..a8c4bcf
--- /dev/null
+++ b/bin/extra/dbnewg
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+die () { >&2 printf '%s\n' "$@"; exit 1; }
+
+[ "$1" ] || die "usage: dbnewg <dir>"
+proj="$(basename "$(readlink -f "$1")")"
+
+ssh git@db '$HOME/initdir.sh' "$proj"
+cd "$1" || exit 1
+git remote add origin git@db:"$proj"
+git push --set-upstream origin main