File pre_checkin.sh of Package wesnoth
cp wesnoth.changes wesnoth-data.changes
{ sed -n -e '1,/COMMON-BEGIN1/p' wesnoth-data.spec
sed -n -e '/COMMON-BEGIN1/,/COMMON-END1/p' wesnoth.spec
sed -n -e '/COMMON-END1/,/COMMON-BEGIN2/p' wesnoth-data.spec
sed -n -e '/COMMON-BEGIN2/,/COMMON-END2/p' wesnoth.spec
sed -n -e '/COMMON-END2/,$p' wesnoth-data.spec; } | uniq > tmp && mv tmp wesnoth-data.spec