File: setversion

package info (click to toggle)
mcl 1%3A14-137-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 10,704 kB
  • ctags: 5,125
  • sloc: ansic: 53,217; sh: 4,448; perl: 3,967; makefile: 422
file content (41 lines) | stat: -rwxr-xr-x 873 bytes parent folder | download | duplicates (3)
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
#!/bin/bash -e

# $Id: setversion,v 1.30 2006-11-17 14:18:53 flux Exp $

# called in Makefile.am and in bootstrap

set -e

# exit

if [[ -z $1 ]]; then
   echo need version - suggest $(date '+%y-%j')
   false
fi

VERSION=$1
MONTHDAY=$(date '+%e')
MONTH=$(date '+%b')
YEAR=$(date '+%Y')

#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 *mclYear = "'$YEAR'";' >> src/impala/version.c

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