Fix mkversion script so that it finds the top-level VERSION file

when obj directories are in use.
This commit is contained in:
Garrett Wollman 1994-02-06 06:58:59 +00:00
parent 069968bf50
commit c5de365eb7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1095

View File

@ -9,12 +9,15 @@ RUN="`expr $RUN + 1`"
echo $RUN > .version
DATE="`date`"
TOPDIR=`echo $0 | sed -e 's;mkversion;..;'`
if [ -r VERSION ]; then
VERSION=VERSION
else if [ -r ${TOPDIR}/VERSION ]; then
VERSION=${TOPDIR}/VERSION
else
VERSION=../VERSION
fi
fi; fi
if [ -f "$VERSION" ]; then
FLAGS="`egrep '^[0-9a-zA-Z_]+=' "$VERSION" | tr '\012' ';'` "