| 1 |
#!/bin/sh |
| 2 |
# increments build number |
| 3 |
buildno=`egrep '^int buildnb' patchlevel.h | awk '{print $4}'` |
| 4 |
totalbno=`egrep '^int totalbnb' patchlevel.h | awk '{print $4}'` |
| 5 |
buildno=`expr ${buildno} + 1` |
| 6 |
totalbno=`expr ${totalbno} + 1` |
| 7 |
sed -e '/^const char \*patchlevel/q' patchlevel.h > tmppatch |
| 8 |
if cp tmppatch patchlevel.h ; then |
| 9 |
rm tmppatch |
| 10 |
echo "int buildnb = $buildno ;" >> patchlevel.h |
| 11 |
echo "int totalbnb = $totalbno ;" >> patchlevel.h |
| 12 |
# use the Real user name if available, else the logname |
| 13 |
if [ "${NAME}" != "" ] ; then |
| 14 |
echo "const char *builder = \"$NAME\" ;" >> patchlevel.h |
| 15 |
else |
| 16 |
echo "const char *builder = \"$USER\" ;" >> patchlevel.h |
| 17 |
fi |
| 18 |
fi |
| 19 |
echo "Incrementing build level" |