diff options
| author | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2017-12-20 13:34:19 (GMT) | 
|---|---|---|
| committer | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2017-12-20 14:09:08 (GMT) | 
| commit | 2b185f0b25aede6e2f40a678647c78bb8e7f8638 (patch) | |
| tree | 865c291f251c37233db2af53ad6777863905ad19 | |
| parent | 3bae7863e235559ceefb7b4e0c9bcf65dba76c00 (diff) | |
| download | swift-2b185f0b25aede6e2f40a678647c78bb8e7f8638.zip swift-2b185f0b25aede6e2f40a678647c78bb8e7f8638.tar.bz2 | |
Allow define the debian repositories to upload
This patch uses SWIFT_PACKAGE_PLATFORMS variable and only updates the
repositories that are defined there.
Test-Information
Tested the script on Ubuntu 16.04 when the variable is/not defined
Change-Id: Ie8f65441f558e3ac663eb8493cedd8c0d2630753
| -rw-r--r-- | Swift/Packaging/Debian/update_debian_repo.sh | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/Swift/Packaging/Debian/update_debian_repo.sh b/Swift/Packaging/Debian/update_debian_repo.sh index d62a376..26c0d5b 100644 --- a/Swift/Packaging/Debian/update_debian_repo.sh +++ b/Swift/Packaging/Debian/update_debian_repo.sh @@ -73,12 +73,23 @@ command -v reprepro >/dev/null 2>&1 || { echo >&2 "This script requires aptly bu  mkdir -p $APT_REPO_ROOT +if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ]; then +	platformsarray=( xenial yakkety jessie sid ) +else +	platformsarray=( $SWIFT_PACKAGE_PLATFORMS ) +fi +  # distros  for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do  	distro_version=`basename $full_distribution_path`  	distro_name=$(basename `dirname $full_distribution_path`)  	distro_reprepro_root=${APT_REPO_ROOT}/${distro_name}/${distro_version} +	if ! [[ $SWIFT_PACKAGE_PLATFORMS == *"$distro_name"* ]]; then +		echo "$distro_name was not found in SWIFT_PACKAGE_PLATFORMS. Skipping..." +		continue +	fi +  	# ensure reprepro diretctory for this distribution version is present  	if [ ! -d "$distro_preprepro_root" ]; then  		echo "Create distribution repository for $distro_name/$distro_version" @@ -89,7 +100,7 @@ for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do  		write_reprepo_conf_incoming_to_file "${distro_reprepro_root}/conf/incoming" "$full_distribution_path"  	fi -	# This is workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808558  +	# This is workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808558  	# and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843402  	if [ "$distro_name/$distro_version" = "debian/sid" ]; then  		sed -i '/dbgsym/ d' $full_distribution_path/*.changes | 
 Swift
 Swift