From 9b9bda8bb3700b25007a1b78958a2a4ac7c2f9cb Mon Sep 17 00:00:00 2001 From: dweller Date: Sat, 9 Mar 2024 02:50:22 +0200 Subject: Initial commit --- git-mkremote | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 git-mkremote (limited to 'git-mkremote') diff --git a/git-mkremote b/git-mkremote new file mode 100755 index 0000000..168f142 --- /dev/null +++ b/git-mkremote @@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright (C) 2024 dwlr +# +# BSD 3-Clause License (BSD-3-Clause) +# See LICENSE for details + +set -e + + +if [ $# -lt 3 ]; then + echo "Usage: $0 [description]" + exit 1; +fi + +name=$1 +serv=$2 +repo=$3 +shift 3 + +remote=$(ssh "$serv" mkrepo "$repo" "$@") +git remote add "$name" "$serv$remote" -- cgit v1.2.3