#!/bin/bash for RELEASE in $RELEASES; do echo "Release: $RELEASE"; if [ $ARCHIVE_TYPE = "ppa" ]; then export SOURCE_PPA_URL="http://ppa.launchpad.net/$LP_TEAM/$SOURCE_PPA/ubuntu/dists/$RELEASE/main"; export DEST_PPA_URL="http://ppa.launchpad.net/$LP_TEAM/$DEST_PPA/ubuntu/dists/$RELEASE/main"; fi # This is the main script, fetching the archives and running Britney ./fetch-indexes $RELEASE; # Britney outputs the candidates for testing migration, read the additions egrep -v '^(#|-)' britney_output/$BRITNEY_TIMESTAMP/HeidiOutputDelta > candidates || echo "No candidates found."; while read -r -a package; do # This can eventually be extendable to different archive types if [ $ARCHIVE_TYPE = "ppa" ]; then ./ubuntu-archive-tools/copy-package -y -b -s $RELEASE --from "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --to "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --version "${package[1]}" "${package[0]}"; ./ubuntu-archive-tools/remove-package -y -s $RELEASE --archive "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --version "${package[1]}" --removal-comment="moved to release" "${package[0]}"; fi done < candidates; rm -rf britney_output/; done