2
# pre_hook.sh - Commands that we run before we run the autotools
4
RELEASE_DATE=`date +%Y.%m`
5
RELEASE_DATE_NODOTS=`date +%Y%m`
6
if test -d ".bzr" ; then
7
echo "Grabbing changelog and version information from bzr"
8
bzr log --short > ChangeLog || touch ChangeLog
10
BZR_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $2}' | head -1`
16
BZR_BRANCH="bzr-export"
18
RELEASE_VERSION="${RELEASE_DATE}.${BZR_REVNO}"
19
RELEASE_ID="${RELEASE_DATE_NODOTS}${BZR_REVNO}"
20
if test "x${BZR_BRANCH}" != "xdrizzle" ; then
21
RELEASE_COMMENT="${BZR_BRANCH}"
23
RELEASE_COMMENT="trunk"
26
if test -f m4/bzr_version.m4.in
28
sed -e "s/@BZR_REVNO@/${BZR_REVNO}/" \
29
-e "s/@BZR_REVID@/${BZR_REVID}/" \
30
-e "s/@BZR_BRANCH@/${BZR_BRANCH}/" \
31
-e "s/@RELEASE_DATE@/${RELEASE_DATE}/" \
32
-e "s/@RELEASE_ID@/${RELEASE_ID}/" \
33
-e "s/@RELEASE_VERSION@/${RELEASE_VERSION}/" \
34
-e "s/@RELEASE_COMMENT@/${RELEASE_COMMENT}/" \
35
m4/bzr_version.m4.in > m4/bzr_version.m4.new
37
if ! diff m4/bzr_version.m4.new m4/bzr_version.m4 >/dev/null 2>&1 ; then
38
mv m4/bzr_version.m4.new m4/bzr_version.m4
40
rm m4/bzr_version.m4.new
45
if test "x$EGREP" != "x" -a -d po
47
echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
48
# The grep -v 'drizzle-' is to exclude any distcheck leftovers
49
for f in `find . | grep -v 'drizzle-' | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
51
if grep gettext.h "$f" | grep include >/dev/null 2>&1
53
echo "$f" >> po/POTFILES.in.in
56
if ! diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
58
mv po/POTFILES.in.in po/POTFILES.in
66
run python config/register_plugins.py || die "Can't execute register_plugins"