File: buildnb

package info (click to toggle)
imview 1.1.9c-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,076 kB
  • ctags: 4,780
  • sloc: cpp: 28,836; sh: 2,624; ansic: 1,818; makefile: 731; exp: 112; python: 88
file content (17 lines) | stat: -rwxr-xr-x 650 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# increments build number
buildno=`egrep '^int buildnb' patchlevel.h | awk '{print $4}'`
totalbno=`egrep '^int totalbnb' patchlevel.h | awk '{print $4}'`
buildno=`expr ${buildno} + 1`
totalbno=`expr ${totalbno} + 1`
sed -e '/^const char \*patchlevel/q' patchlevel.h > tmppatch
mv tmppatch patchlevel.h
echo "int buildnb = $buildno ;" >> patchlevel.h 
echo "int totalbnb = $totalbno ;" >> patchlevel.h 
# use the Real user name if available, else the logname
if [ "${NAME}" != "" ] ; then
    echo "char *builder = \"$NAME\" ;" >> patchlevel.h 
else
    echo "char *builder = \"$USER\" ;" >> patchlevel.h 
fi
echo "Incrementing build level"