~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to config/pre_hook.sh

  • Committer: Brian Aker
  • Date: 2009-10-15 00:22:33 UTC
  • mto: (1183.1.11 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@gaz-20091015002233-fa4ao2mbc67wls91
First pass of information engine. OMG, ponies... is it so much easier to
deal with creating and engine.

The list table iterator though... its ass, needs to go. We should also
abstract out share. Very few engines need a custom one. Just say'in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# Copyright (c) 2009 Monty Taylor
3
 
# All rights reserved.
4
 
#
5
 
# Redistribution and use in source and binary forms, with or without
6
 
# modification, are permitted provided that the following conditions are
7
 
# met:
8
 
#
9
 
#     * Redistributions of source code must retain the above copyright
10
 
# notice, this list of conditions and the following disclaimer.
11
 
#
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
15
 
# distribution.
16
 
#
17
 
#     * The names of its contributors may not be used to endorse or
18
 
# promote products derived from this software without specific prior
19
 
# written permission.
20
 
#
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.
32
 
#
33
 
 
34
 
if test ! -f  config/plugin.stamp
35
 
then
36
 
  touch config/plugin.stamp
37
 
fi
38
 
run python config/pandora-plugin write
 
1
# pre_hook.sh - Commands that we run before we run the autotools
 
2
 
 
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
 
8
  BZR_REVNO=`bzr revno`
 
9
  BZR_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $2}' | head -1`
 
10
  BZR_BRANCH=`bzr nick`
 
11
else
 
12
  touch ChangeLog
 
13
  BZR_REVNO="0"
 
14
  BZR_REVID="unknown"
 
15
  BZR_BRANCH="bzr-export"
 
16
fi
 
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}"
 
21
else
 
22
  RELEASE_COMMENT="trunk"
 
23
fi
 
24
 
 
25
if test -f m4/bzr_version.m4.in
 
26
then
 
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
 
35
  
 
36
  if diff m4/bzr_version.m4.new m4/bzr_version.m4 >/dev/null 2>&1 ; then
 
37
    rm m4/bzr_version.m4.new
 
38
  else
 
39
    mv m4/bzr_version.m4.new m4/bzr_version.m4
 
40
  fi
 
41
fi
 
42
 
 
43
EGREP=`which egrep`
 
44
if test "x$EGREP" != "x" -a -d po
 
45
then
 
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`
 
49
  do
 
50
    if grep gettext.h "$f" | grep include >/dev/null 2>&1
 
51
    then
 
52
      echo "$f" >> po/POTFILES.in.in
 
53
    fi
 
54
  done
 
55
  if diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
 
56
  then
 
57
    rm po/POTFILES.in.in
 
58
  else
 
59
    mv po/POTFILES.in.in po/POTFILES.in
 
60
  fi
 
61
else
 
62
  touch po/POTFILES.in
 
63
fi
 
64
 
 
65
run python config/register_plugins.py || die  "Can't execute register_plugins"