Replace tell_config with NetBSD osrelease.sh
This commit is contained in:
parent
da26ee9d09
commit
40b67629c5
3 changed files with 5 additions and 20 deletions
|
@ -25,8 +25,6 @@ rotate_oldest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
|
|
||||||
|
|
||||||
mdec=/usr/mdec # bootstraps
|
mdec=/usr/mdec # bootstraps
|
||||||
# If no DESTDIR specified, then act on / or on the current chroot
|
# If no DESTDIR specified, then act on / or on the current chroot
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
@ -74,8 +72,7 @@ esac
|
||||||
|
|
||||||
case $action in
|
case $action in
|
||||||
hdboot)
|
hdboot)
|
||||||
sh tell_config OS_RELEASE . OS_VERSION >/tmp/mkb.$$
|
version=`sh ../sys/conf/osrelease.sh`
|
||||||
version=`sed 's/[" ]//g;/^$/d' </tmp/mkb.$$`
|
|
||||||
|
|
||||||
# Retrieve the git revision; this only succeeds
|
# Retrieve the git revision; this only succeeds
|
||||||
# if git is available, it's a git checkout, *and*
|
# if git is available, it's a git checkout, *and*
|
||||||
|
@ -86,18 +83,13 @@ hdboot)
|
||||||
|
|
||||||
revision=`cat revision 2>/dev/null`
|
revision=`cat revision 2>/dev/null`
|
||||||
|
|
||||||
if [ -z "$revision" ]
|
|
||||||
then rrevision=""
|
|
||||||
gitrev=""
|
|
||||||
else rrevision=r$revision
|
|
||||||
fi
|
|
||||||
|
|
||||||
oldrev=$revision
|
oldrev=$revision
|
||||||
|
|
||||||
if [ -z "$revision" ]
|
if [ -z "$revision" ]
|
||||||
then
|
then
|
||||||
revision=0
|
revision=0
|
||||||
rrevision=""
|
rrevision=""
|
||||||
|
gitrev=""
|
||||||
else
|
else
|
||||||
revision=`expr $revision + 1`
|
revision=`expr $revision + 1`
|
||||||
rrevision=r$revision
|
rrevision=r$revision
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
|
|
||||||
. release.functions
|
. release.functions
|
||||||
|
|
||||||
version_pretty="`sh tell_config OS_RELEASE . OS_VERSION | tr -dc 0-9.`"
|
version_pretty="`sh ../sys/conf/osrelease.sh`"
|
||||||
version="`echo $version_pretty | tr . _`"
|
version="`echo $version_pretty | tr . _`"
|
||||||
PACKAGEDIR=/usr/pkgsrc/packages/$version_pretty/`uname -m`
|
PACKAGEDIR=/usr/pkgsrc/packages/$version_pretty/`uname -m`
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@ RELEASEMNTDIR=/usr/r
|
||||||
IMAGE=/usr/mdec/bootxx_cd9660
|
IMAGE=/usr/mdec/bootxx_cd9660
|
||||||
ROOTIMAGE=rootimage
|
ROOTIMAGE=rootimage
|
||||||
CDFILES=/usr/tmp/cdreleasefiles
|
CDFILES=/usr/tmp/cdreleasefiles
|
||||||
sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$
|
|
||||||
IMG_BASE=minix${version}_ide
|
IMG_BASE=minix${version}_ide
|
||||||
BS=4096
|
BS=4096
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,5 @@
|
||||||
# tellconfig - Tell the value of a <minix/config.h> parameter
|
# tellconfig - Tell the value of a <minix/config.h> parameter
|
||||||
# Author: Kees J. Bot
|
# Author: Kees J. Bot
|
||||||
|
|
||||||
echo "
|
NETBSDSRCDIR=`dirname $0`/..
|
||||||
#include \"../include/minix/config.h\"
|
exec sh $NETBSDSRCDIR/sys/conf/osrelease.sh
|
||||||
$*
|
|
||||||
" >/tmp/tell.$$
|
|
||||||
exec </tmp/tell.$$
|
|
||||||
rm /tmp/tell.$$
|
|
||||||
|
|
||||||
exec clang -P -E -
|
|
||||||
|
|
Loading…
Reference in a new issue