From 4f8e2c1a36f85c55ca2bc190af9804c590ec7186 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 1 Oct 2023 23:26:28 +0200 Subject: added dbnewg --- bin/extra/dbnewg | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bin/extra/dbnewg 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 " +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 -- cgit v1.2.3