#!/bin/bash if [ -z ${JENKINS_DEBIAN_GLUE_QUIET:-} ]; then set -x fi set -e bailout() { [ -n "${1:-}" ] && EXIT="${1}" || EXIT=0 [ -n "${2:-}" ] && echo "$2" >&2 rm -f /var/lock/jdg-generate-reprepro-codename."$(id -un)" exit $EXIT } # backwards compatibility, see PR#94 if [ -z "${REPOSITORY:-}" ] ; then repository_is_missing_in_env=true else repository_is_missing_in_env=false fi if [ -r /etc/jenkins/debian_glue ] ; then echo "*** Sourcing /etc/jenkins/debian_glue ***" . /etc/jenkins/debian_glue fi # backwards compatibility, see PR#94 if [ -n "${REPOSITORY:-}" ] && $repository_is_missing_in_env ; then echo "*** WARNING: 'REPOSITORY' set in /etc/jenkins/debian_glue but should be DEFAULT_REPOSITORY ***" echo "*** WARNING: Setting DEFAULT_REPOSITORY to $REPOSITORY for backwards compatibility ***" echo "*** WARNING: Please replace REPOSITORY=... in /etc/jenkins/debian_glue with DEFAULT_REPOSITORY=... ***" DEFAULT_REPOSITORY="${REPOSITORY}" fi if [ "${BUILD_ONLY:-}" = "true" ] ; then echo "BUILD_ONLY is set to true, ignoring request to generate local repository." exit 0 fi ARCHITECTURES="${ARCHITECTURES:-amd64 i386 source}" COMPONENTS="${COMPONENTS:-main}" UDEB_COMPONENTS="${UDEB_COMPONENTS:-main}" usage() { echo "Usage: $0" \ "[ --architectures ]" \ "[ --components ]" \ "[ --udeb-components ]" \ "[ --origin ]" \ "[ --suite ]" \ "[ --label