summaryrefslogtreecommitdiff
path: root/bin/extra/dbnewg
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-15 00:33:26 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-15 00:33:26 +0200
commit826ce094fecc4c6e07faf6e8b91387c2ae49842c (patch)
tree1820c843e4e260f6b51e8d269a972295a17e558c /bin/extra/dbnewg
parentc032a9d071ee4b7eb2bfe79ec03d2a7dc4020f15 (diff)
parenta915b5ade1a47b9678e2f9963b13b49dbd406031 (diff)
Merge branch 'main' of db:dotfiles
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