Deleted Added
full compact
newvers.sh (302408) newvers.sh (312318)
1#!/bin/sh -
2#
1#!/bin/sh -
2#
3# $FreeBSD: stable/11/sys/boot/common/newvers.sh 289896 2015-10-24 21:59:58Z ngie $
3# $FreeBSD: stable/11/sys/boot/common/newvers.sh 312318 2017-01-17 01:29:03Z emaste $
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:

--- 23 unchanged lines hidden (view full) ---

35tempfile=$(mktemp tmp.XXXXXX) || exit
36trap "rm -f $tempfile" EXIT INT TERM
37
38LC_ALL=C; export LC_ALL
39u=${USER-root} h=${HOSTNAME-`hostname`} t=`date`
40#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '`
41r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1`
42
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:

--- 23 unchanged lines hidden (view full) ---

35tempfile=$(mktemp tmp.XXXXXX) || exit
36trap "rm -f $tempfile" EXIT INT TERM
37
38LC_ALL=C; export LC_ALL
39u=${USER-root} h=${HOSTNAME-`hostname`} t=`date`
40#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '`
41r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1`
42
43echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > $tempfile
44echo "char bootprog_rev[] = \"${r}\";" >> $tempfile
45echo "char bootprog_date[] = \"${t}\";" >> $tempfile
46echo "char bootprog_maker[] = \"${u}@${h}\";" >> $tempfile
43echo "char bootprog_info[] = \"FreeBSD/${3} ${2}, Revision ${r}\\n(${t} ${u}@${h})\\n\";" > $tempfile
44echo "unsigned bootprog_rev = ${r%%.*}${r##*.};" >> $tempfile
47mv $tempfile vers.c
45mv $tempfile vers.c