]> Zhao Yanbai Git Server - minix.git/commitdiff
Replace tell_config with NetBSD osrelease.sh 62/262/1
authorAntoine Leca <Antoine.Leca.1@gmail.com>
Wed, 23 Jan 2013 08:13:24 +0000 (08:13 +0000)
committerLionel Sambuc <lionel@minix3.org>
Fri, 25 Jan 2013 17:44:17 +0000 (18:44 +0100)
releasetools/mkboot
releasetools/release.sh
releasetools/tell_config

index ec72b3787586a529c99c3288c6622c22e78509d5..169a8c0f3d06144492917226e61180d346dddfeb 100755 (executable)
@@ -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
index 18acc0486e758064265318e79e7d76c53f2ac19f..209652c58e531aa04875ccd53c8d25ae452f4d65 100755 (executable)
@@ -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
 
index 8a0cc2a41ba44b6a52d51bff2e63566e82583cca..dcde01ffe70d4a2b492a5b6e4be021ec51b39be4 100755 (executable)
@@ -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