newvers.sh (128019) | newvers.sh (131393) |
---|---|
1#!/bin/sh - 2# | 1#!/bin/sh - 2# |
3# $FreeBSD: head/sys/boot/common/newvers.sh 128019 2004-04-07 20:46:16Z imp $ | 3# $FreeBSD: head/sys/boot/common/newvers.sh 131393 2004-07-01 06:40:12Z ps $ |
4# $NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $ 5# 6# Copyright (c) 1984, 1986, 1990, 1993 7# The Regents of the University of California. All rights reserved. 8# 9# Redistribution and use in source and binary forms, with or without 10# modification, are permitted provided that the following conditions 11# are met: --- 16 unchanged lines hidden (view full) --- 28# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31# SUCH DAMAGE. 32# 33# @(#)newvers.sh 8.1 (Berkeley) 4/20/94 34 35LC_ALL=C; export LC_ALL | 4# $NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $ 5# 6# Copyright (c) 1984, 1986, 1990, 1993 7# The Regents of the University of California. All rights reserved. 8# 9# Redistribution and use in source and binary forms, with or without 10# modification, are permitted provided that the following conditions 11# are met: --- 16 unchanged lines hidden (view full) --- 28# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31# SUCH DAMAGE. 32# 33# @(#)newvers.sh 8.1 (Berkeley) 4/20/94 34 35LC_ALL=C; export LC_ALL |
36u=${USER-root} h=`hostname` t=`date` | 36u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` |
37#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` 38r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` 39 40echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c 41echo "char bootprog_rev[] = \"${r}\";" >> vers.c 42echo "char bootprog_date[] = \"${t}\";" >> vers.c 43echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c | 37#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` 38r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` 39 40echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c 41echo "char bootprog_rev[] = \"${r}\";" >> vers.c 42echo "char bootprog_date[] = \"${t}\";" >> vers.c 43echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c |