~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to config/pre_hook.sh

  • Committer: Brian Aker
  • Date: 2009-11-18 06:11:12 UTC
  • mfrom: (1220.1.10 staging)
  • Revision ID: brian@gaz-20091118061112-tyf4qrfr5v7i946b
Monty + Brian Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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"
 
1
echo "Running register_plugins.py"
 
2
if test ! -f  config/plugin.stamp
 
3
then
 
4
  touch config/plugin.stamp
 
5
fi
 
6
python config/register_plugins.py write