#!/bin/bash # This script is called automatically during autobuild checkin. version=$(grep '^Version:.*' file.spec) cp -f file.changes python-magic.changes sed -i -e "s,Version:.*,$version," python-magic.spec