1#! /bin/sh
2
3# mkstamp - extract data from Revision and Date RCS tags in a file
4# Copyright (C) 1999 Free Software Foundation, Inc.
5# Alexandre Oliva <oliva@dcc.unicamp.br>
6#
7# This file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15# General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20# 02110-1301, USA.
21#
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27# This script expects to find a line containing both Revision and Date
28# tags, and it edits this line so that it looks line ` ($rev $date)'
29
30# Command-line arguments are passed down to sed; additional -e cmd
31# arguments are acceptable.  If no input filename is specified in the
32# command line, sed will read from stdin.
33
34exec sed -e '
35	s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% (\1 \2)%
36	t end
37	d
38	: end' ${1+"$@"}
39