#!/bin/sh -x 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" ;; *) ORIGIN="debian" BRANCH="progress-linux" SSH_OPTIONS="-o ControlMaster=no" ;; esac case "${DISTRIBUTION}" in sid|rc-buggy) CATEGORY="" ORIGIN="debian" BRANCH="debian" SSH_OPTIONS="-o ControlMaster=no" ;; sid|rc-buggy) CATEGORY="upstream" ORIGIN="fastforward-packages" BRANCH="main" SSH_OPTIONS="-o ControlMaster=no" ;; *) CATEGORY="" ORIGIN="${DISTRIBUTION}" BRANCH="fastforward" 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.fastforward-packages.org create ${REPOSITORY} ssh ${SSH_OPTIONS} git@git.fastforward-packages.org desc ${REPOSITORY} ${ORIGIN}: ${PACKAGE} case "${BRANCH}" in main) ;; *) ssh ${SSH_OPTIONS} git@git.fastforward-packages.org symbolic-ref ${REPOSITORY} HEAD refs/heads/${BRANCH} ;; esac done