#! /bin/sh

set -e

GCL_REMOVEWRITE=0
. packageinfo.sh
if [ ! -w . ] ; then
        GCL_REMOVEWRITE=1
        chmod u+w .
        [ -f CommitLog -a ! -w CommitLog ] && chmod u+w CommitLog
fi
bk -R prs -hr${CLTAG}.. -nd':I:' | bk changes -m -v - > CommitLog.new
mv CommitLog.new CommitLog
case "$GCL_REMOVEWRITE" in
 1) chmod a-w CommitLog .
esac
