#!/bin/bash
# This script is called automatically during autobuild checkin.

for spec in python27-doc.spec python27.spec; do
{ sed -n -e '1,/COMMON-PATCH-BEGIN/p' $spec
  sed -n -e '/COMMON-PATCH-BEGIN/,/COMMON-PATCH-END/p' python27-base.spec
  sed -n -e '/COMMON-PATCH-END/,/COMMON-PREP-BEGIN/p' $spec
  sed -n -e '/COMMON-PREP-BEGIN/,/COMMON-PREP-END/p' python27-base.spec
  sed -n -e '/COMMON-PREP-END/,$p' $spec;
 } | uniq > $spec.tmp && mv $spec.tmp $spec
done

# I really don't want to keep all three *.changes files separate
cp python27-base.changes python27.changes
cp python27-base.changes python27-doc.changes
