X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=scripts%2Fdebian%2Frelease_team_removals.sh;fp=scripts%2Fdebian%2Frelease_team_removals.sh;h=3e06755f781265961c73f7535462f7b1a39432b7;hp=82e4e72638b7e22fb44520fc34ffaff2cfe49db0;hb=f227c91fcba03042d9fe1afb368b6cc0525e510f;hpb=d24eef69e4186ab8d8125af336f2e0209884ab70 diff --git a/scripts/debian/release_team_removals.sh b/scripts/debian/release_team_removals.sh index 82e4e726..3e06755f 100755 --- a/scripts/debian/release_team_removals.sh +++ b/scripts/debian/release_team_removals.sh @@ -30,26 +30,23 @@ set -u export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars . $SCRIPTVARS -SUITE="testing-proposed-updates" -IMPORTDIR="/srv/release.debian.org/sets/tpu-removals" -IMPORTFILE="${IMPORTDIR}/current" +tempfile=$(mktemp) +trap "rm -f ${tempfile}" EXIT -if [ ! -e "${IMPORTFILE}" ]; then - echo "${IMPORTFILE} not found" +cat > ${tempfile} +expected_checksum="${SSH_ORIGINAL_COMMAND}" +if ! echo "${expected_checksum} ${tempfile}" | md5sum --check --quiet; then exit 1 fi # Change to a known safe location cd $masterdir -echo "Performing cleanup on ${SUITE}" +SUITE="testing-proposed-updates" -dak control-suite --remove ${SUITE} < ${IMPORTFILE} +echo "Performing cleanup on ${SUITE}" -if [ $? -eq 0 ]; then - NOW=$(date "+%Y%m%d%H%M") - mv "${IMPORTFILE}" "${IMPORTDIR}/processed.${NOW}" -fi +dak control-suite --remove ${SUITE} < ${tempfile} echo "Done"