File pre_checkin.sh of Package ConsoleKit

#!/bin/sh

function fail {
    echo Something failed.  Too bad.
    exit 1
}

rm -f ConsoleKit-doc.spec.tmp

cat ConsoleKit.spec \
    | sed 's/^Name: *ConsoleKit/Name:           ConsoleKit-doc/g' \
    | sed 's/^%define *build_doc 0/%define         build_doc 1/g' \
    > ConsoleKit-doc.spec.tmp || fail

mv ConsoleKit-doc.spec.tmp ConsoleKit-doc.spec || fail

echo Fixed up ConsoleKit-doc.spec.

cp ConsoleKit.changes ConsoleKit-doc.changes

echo Copied ConsoleKit.changes to ConsoleKit-doc.changes

osc service localrun format_spec_file