home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume8
/
libhoward
/
part08
/
mkFreeze.b
< prev
next >
Wrap
Text File
|
1989-10-01
|
1KB
|
45 lines
# mkFreeze - make FREEZE.{date,i,major,minor,version}
#
# $Header: mkFreeze.b,v 1.3 89/09/20 13:40:05 howard Exp $
#
# Copyright 1989 Howard Lee Gayle
# This file is written in the ISO 8859/1 character set.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 1,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Shell variables:
# u - usage string
CMDNAME=mkFreeze
export CMDNAME
u="Usage: $CMDNAME"
if [ $# -ne 0 ]
then
echo "$u" 1>&2
exit 1
fi
awk '/^.Header: FREEZE,v /{
print $3 > "FREEZE.version";
split ($3, t, ".");
print t[1] > "FREEZE.major";
print t[2] > "FREEZE.minor";
y=substr($4,1,2);
if (y < 70) y += 2000; else y += 1900;
dat=sprintf "%d-%s-%s %s",y,substr($4,4,2),substr($4,7,2),$5;
print dat > "FREEZE.date";
d = "#define FRZ_";
printf "%sMAJ %s\n%sMIN %s\n%sDAT \"%s\"\n%sID \"@(#)%s\"\n",d,t[1],d,t[2],d,dat,d,$0 > "FREEZE.i";
}' < FREEZE