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