#!/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"