2
# Copyright (c) 2009 Monty Taylor
5
# Redistribution and use in source and binary forms, with or without
6
# modification, are permitted provided that the following conditions are
9
# * Redistributions of source code must retain the above copyright
10
# notice, this list of conditions and the following disclaimer.
12
# * Redistributions in binary form must reproduce the above
13
# copyright notice, this list of conditions and the following disclaimer
14
# in the documentation and/or other materials provided with the
17
# * The names of its contributors may not be used to endorse or
18
# promote products derived from this software without specific prior
21
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
if test ! -f config/plugin.stamp
36
touch config/plugin.stamp
38
run python config/pandora-plugin write
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"