#!/bin/bash

for changes in *changes; do
        source_files=`awk '
                BEGIN {p=0;}
                /^[A-Za-z]/ {p=0}
                /^Files:/ {p=1}
                /^ / {if( p == 1 ) { gsub("contrib/", ""); print "../main/source/" $3 "/" $5; } }
                ' $changes;echo $changes`

	echo $changes:
	for source in $source_files; do
		if [ ! -e $source ]; then
			echo 'BAD:	' $source
		else
			echo rm $source
			rm $source
		fi
	done
done

