From 453cc058d9ee6d7cb47529d99061216e72149a5f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 9 May 2021 06:21:55 +0200 Subject: Adding bin. Signed-off-by: Daniel Baumann --- bin/git-new.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 bin/git-new.sh (limited to 'bin/git-new.sh') diff --git a/bin/git-new.sh b/bin/git-new.sh new file mode 100755 index 0000000..e5fe8ef --- /dev/null +++ b/bin/git-new.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +set -e + +if [ -z "${1}" ] || [ -z "${2}" ] +then + echo "Usage: ${0} DISTRIBUTION PACKAGE" + exit 1 +fi + +CATEGORY="packages" + +DISTRIBUTION="${1}" +shift 1 + +PACKAGES="${@}" + +case "${DISTRIBUTION}" in + *-extras) + ORIGIN="progress-linux" + BRANCH="progress-linux" + ;; + + *-backports) + ORIGIN="debian-backports" + BRANCH="progress-linux" + ;; + + daniel*) + CATEGORY="users/daniel.baumann/debian/packages" + DISTRIBUTION="" + ORIGIN="debian" + BRANCH="debian" + ;; + + *) + ORIGIN="debian" + BRANCH="progress-linux" + ;; +esac + +for PACKAGE in ${PACKAGES} +do + REPOSITORY="$(echo ${CATEGORY}/${DISTRIBUTION}/${PACKAGE} | sed -e 's|//|/|g')" + + ssh git@git.progress-linux.org create ${REPOSITORY} + ssh git@git.progress-linux.org desc ${REPOSITORY} ${ORIGIN}: ${PACKAGE} + ssh git@git.progress-linux.org symbolic-ref ${REPOSITORY} HEAD refs/heads/${BRANCH} +done -- cgit v1.2.3