#!/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="${@}" SSH_OPTIONS="" case "${DISTRIBUTION}" in *-extras) ORIGIN="progress-linux" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; *-security) ORIGIN="debian-security" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; *-updates) ORIGIN="debian-updates" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; *-backports) ORIGIN="debian-backports" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; daniel*) CATEGORY="users/daniel.baumann/debian/packages" DISTRIBUTION="" ORIGIN="debian" BRANCH="debian" SSH_OPTIONS="-i ~/.ssh/keys/daniel.baumann@progress-linux.org -o ControlMaster=no" ;; *) ORIGIN="debian" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; esac for PACKAGE in ${PACKAGES} do REPOSITORY="$(echo ${CATEGORY}/${DISTRIBUTION}/${PACKAGE} | sed -e 's|//|/|g')" ssh ${SSH_OPTIONS} git@git.progress-linux.org create ${REPOSITORY} ssh ${SSH_OPTIONS} git@git.progress-linux.org desc ${REPOSITORY} ${ORIGIN}: ${PACKAGE} ssh ${SSH_OPTIONS} git@git.progress-linux.org symbolic-ref ${REPOSITORY} HEAD refs/heads/${BRANCH} done