File: buildnb

package info (click to toggle)
imview 1.1.8-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,052 kB
  • ctags: 3,797
  • sloc: cpp: 29,842; sh: 2,620; ansic: 1,835; makefile: 756; exp: 112; python: 88
file content (12 lines) | stat: -rwxr-xr-x 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/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 
echo "char *builder = \"$NAME\" ;" >> patchlevel.h 
echo "Incrementing build level"