[Midnightbsd-cvs] src [9878] trunk/sys/boot/common/newvers.sh: update script
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu May 24 07:24:03 EDT 2018
Revision: 9878
http://svnweb.midnightbsd.org/src/?rev=9878
Author: laffer1
Date: 2018-05-24 07:24:02 -0400 (Thu, 24 May 2018)
Log Message:
-----------
update script
Modified Paths:
--------------
trunk/sys/boot/common/newvers.sh
Property Changed:
----------------
trunk/sys/boot/common/newvers.sh
Modified: trunk/sys/boot/common/newvers.sh
===================================================================
--- trunk/sys/boot/common/newvers.sh 2018-05-24 11:22:34 UTC (rev 9877)
+++ trunk/sys/boot/common/newvers.sh 2018-05-24 11:24:02 UTC (rev 9878)
@@ -1,6 +1,7 @@
#!/bin/sh -
#
-# $MidnightBSD: src/sys/boot/common/newvers.sh,v 1.3 2012/12/29 04:58:20 laffer1 Exp $
+# $MidnightBSD$
+# $FreeBSD: stable/9/sys/boot/common/newvers.sh 290878 2015-11-15 20:20:03Z ngie $
# $NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $
#
# Copyright (c) 1984, 1986, 1990, 1993
@@ -32,12 +33,16 @@
#
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
+tempfile=$(mktemp tmp.XXXXXX) || exit
+trap "rm -f $tempfile" EXIT INT TERM
+
LC_ALL=C; export LC_ALL
u=${USER-root} h=${HOSTNAME-`hostname`} t=`date`
#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '`
r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1`
-echo "char bootprog_name[] = \"MidnightBSD/${3} ${2}\";" > vers.c
-echo "char bootprog_rev[] = \"${r}\";" >> vers.c
-echo "char bootprog_date[] = \"${t}\";" >> vers.c
-echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c
+echo "char bootprog_name[] = \"MidnightBSD/${3} ${2}\";" > $tempfile
+echo "char bootprog_rev[] = \"${r}\";" >> $tempfile
+echo "char bootprog_date[] = \"${t}\";" >> $tempfile
+echo "char bootprog_maker[] = \"${u}@${h}\";" >> $tempfile
+mv $tempfile vers.c
Property changes on: trunk/sys/boot/common/newvers.sh
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list