File: setversion

package info (click to toggle)
mcl 1%3A06-021-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,276 kB
  • ctags: 2,975
  • sloc: ansic: 32,352; sh: 3,556; perl: 1,437; makefile: 338
file content (42 lines) | stat: -rwxr-xr-x 899 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/local/bin/bash -e

# $Id: setversion,v 1.26 2006-01-23 23:07:49 flux Exp $

# called in Makefile.am and in bootstrap

set -x

TAG=1.006

VERSION=`date '+%y-%j'`
MONTHDAY=$(date '+%e')
MONTH=$(date '+%b')
YEAR=$(date '+%Y')

VERSION="06-021"
MONTHDAY=21
MONTH=Jan
YEAR=2006

#VERSION='03-277'
#MONTHDAY=4
echo $VERSION > VERSION


cat > configure.ac <<EOT
# configure.ac - generated from configure.ac.in by setversion. do not edit
# configure.ac, but edit the master.
EOT

sed "s/setversion_VERSION/$VERSION/" configure.ac.in > configure.ac

# echo '#include "version.h"' > src/mcl/version.c
echo 'const char *mclDateTag = "'$VERSION'";' > src/impala/version.c
echo 'const char *mclNumTag = "'$TAG'";' >> src/impala/version.c

echo $TAG      >  doc/stamp.tag
echo $VERSION  >  doc/stamp.stamp
echo $MONTHDAY >  doc/stamp.day
echo $MONTH    >  doc/stamp.month
echo $YEAR     >  doc/stamp.year