http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
[m4/ericb.git] / config / mkstamp
blob3c8c2d1d924b7e41c8038c8b8a7ab7e59098a74b
1 #! /bin/sh
3 # mkstamp - extract data from Revision and Date RCS tags in a file
4 # Copyright (C) 1999, 2003 Free Software Foundation, Inc.
5 # Alexandre Oliva <oliva@dcc.unicamp.br>
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.
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.
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 02110-1301, USA.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
26 # This script expects to find a line containing both Revision and Date
27 # tags, and it edits this line so that it looks like ` $rev $date'
29 # Command-line arguments are passed down to sed; additional -e cmd
30 # arguments are acceptable. If no input filename is specified in the
31 # command line, sed will read from stdin.
33 exec sed -e '
34 s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% \1 \2%
35 t end
37 : end' ${1+"$@"}