Replace tell_config with NetBSD osrelease.sh

This commit is contained in:
Antoine Leca 2013-01-23 08:13:24 +00:00 committed by Lionel Sambuc
parent da26ee9d09
commit 40b67629c5
3 changed files with 5 additions and 20 deletions

View file

@ -25,8 +25,6 @@ rotate_oldest() {
}
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
mdec=/usr/mdec # bootstraps
# If no DESTDIR specified, then act on / or on the current chroot
DESTDIR=
@ -74,8 +72,7 @@ esac
case $action in
hdboot)
sh tell_config OS_RELEASE . OS_VERSION >/tmp/mkb.$$
version=`sed 's/[" ]//g;/^$/d' </tmp/mkb.$$`
version=`sh ../sys/conf/osrelease.sh`
# Retrieve the git revision; this only succeeds
# if git is available, it's a git checkout, *and*
@ -86,18 +83,13 @@ hdboot)
revision=`cat revision 2>/dev/null`
if [ -z "$revision" ]
then rrevision=""
gitrev=""
else rrevision=r$revision
fi
oldrev=$revision
if [ -z "$revision" ]
then
revision=0
rrevision=""
gitrev=""
else
revision=`expr $revision + 1`
rrevision=r$revision

View file

@ -4,7 +4,7 @@ set -e
. 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 . _`"
PACKAGEDIR=/usr/pkgsrc/packages/$version_pretty/`uname -m`
@ -52,7 +52,6 @@ RELEASEMNTDIR=/usr/r
IMAGE=/usr/mdec/bootxx_cd9660
ROOTIMAGE=rootimage
CDFILES=/usr/tmp/cdreleasefiles
sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$
IMG_BASE=minix${version}_ide
BS=4096

View file

@ -3,11 +3,5 @@
# tellconfig - Tell the value of a <minix/config.h> parameter
# Author: Kees J. Bot
echo "
#include \"../include/minix/config.h\"
$*
" >/tmp/tell.$$
exec </tmp/tell.$$
rm /tmp/tell.$$
exec clang -P -E -
NETBSDSRCDIR=`dirname $0`/..
exec sh $NETBSDSRCDIR/sys/conf/osrelease.sh