diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-15 00:33:26 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-15 00:33:26 +0200 |
commit | 826ce094fecc4c6e07faf6e8b91387c2ae49842c (patch) | |
tree | 1820c843e4e260f6b51e8d269a972295a17e558c /bin/extra/dbnewg | |
parent | c032a9d071ee4b7eb2bfe79ec03d2a7dc4020f15 (diff) | |
parent | a915b5ade1a47b9678e2f9963b13b49dbd406031 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra/dbnewg')
-rwxr-xr-x | bin/extra/dbnewg | 11 |
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 |