14a5d661aSToomas Soome#!/bin/sh - 24a5d661aSToomas Soome# 34a5d661aSToomas Soome# $NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $ 44a5d661aSToomas Soome# 54a5d661aSToomas Soome# Copyright (c) 1984, 1986, 1990, 1993 64a5d661aSToomas Soome# The Regents of the University of California. All rights reserved. 74a5d661aSToomas Soome# 84a5d661aSToomas Soome# Redistribution and use in source and binary forms, with or without 94a5d661aSToomas Soome# modification, are permitted provided that the following conditions 104a5d661aSToomas Soome# are met: 114a5d661aSToomas Soome# 1. Redistributions of source code must retain the above copyright 124a5d661aSToomas Soome# notice, this list of conditions and the following disclaimer. 134a5d661aSToomas Soome# 2. Redistributions in binary form must reproduce the above copyright 144a5d661aSToomas Soome# notice, this list of conditions and the following disclaimer in the 154a5d661aSToomas Soome# documentation and/or other materials provided with the distribution. 164a5d661aSToomas Soome# 4. Neither the name of the University nor the names of its contributors 174a5d661aSToomas Soome# may be used to endorse or promote products derived from this software 184a5d661aSToomas Soome# without specific prior written permission. 194a5d661aSToomas Soome# 204a5d661aSToomas Soome# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 214a5d661aSToomas Soome# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 224a5d661aSToomas Soome# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 234a5d661aSToomas Soome# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 244a5d661aSToomas Soome# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 254a5d661aSToomas Soome# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 264a5d661aSToomas Soome# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274a5d661aSToomas Soome# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 284a5d661aSToomas Soome# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 294a5d661aSToomas Soome# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 304a5d661aSToomas Soome# SUCH DAMAGE. 314a5d661aSToomas Soome# 324a5d661aSToomas Soome# @(#)newvers.sh 8.1 (Berkeley) 4/20/94 334a5d661aSToomas Soome 344a5d661aSToomas Soometempfile=$(mktemp tmp.XXXXXX) || exit 354a5d661aSToomas Soometrap "rm -f $tempfile" EXIT INT TERM 364a5d661aSToomas Soome 374a5d661aSToomas SoomeLC_ALL=C; export LC_ALL 38*c8951589SToomas Soomer="$1" 394a5d661aSToomas Soome 40*c8951589SToomas Soomeecho "char bootprog_info[] = \"illumos/${3} ${2}, Revision ${r}\\\\n\";" > $tempfile 41*c8951589SToomas Soomeecho "unsigned bootprog_rev = ${r%%.*}${r##*.};" >> $tempfile 424a5d661aSToomas Soomemv $tempfile vers.c 43