#!/bin/sh
#
# Merge all the source and binary .changes files for an upload to
# Debian unstable.
set -eu
is_for_unstable()
{
grep '^Distribution: unstable$' "$1" > /dev/null
}
for candidate in "$@"
do
if is_for_unstable "$candidate"
then
printf '%s\0' "$candidate"
fi
done |
xargs -0 mergechanges -f