diff options
Diffstat (limited to 'git-mkremote')
-rwxr-xr-x | git-mkremote | 21 |
1 files changed, 21 insertions, 0 deletions
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 <dweller@cabin.digital> +# +# BSD 3-Clause License (BSD-3-Clause) +# See LICENSE for details + +set -e + + +if [ $# -lt 3 ]; then + echo "Usage: $0 <name> <server> <repo name> [description]" + exit 1; +fi + +name=$1 +serv=$2 +repo=$3 +shift 3 + +remote=$(ssh "$serv" mkrepo "$repo" "$@") +git remote add "$name" "$serv$remote" |