diff lib-src/=rcs2log @ 535:4b75abb93479

Don't munge $* when getting date from ChangeLog.
author Paul Eggert <eggert@twinsun.com>
date Wed, 05 Feb 1992 17:25:10 +0000
parents 6f7abc0e1f10
children efa0c124c178
line wrap: on
line diff
--- a/lib-src/=rcs2log	Wed Feb 05 04:31:18 1992 +0000
+++ b/lib-src/=rcs2log	Wed Feb 05 17:25:10 1992 +0000
@@ -2,7 +2,7 @@
 
 # RCS to ChangeLog generator
 
-#	$Id: rcs2clog,v 1.2 1992/02/05 04:29:40 eggert Exp $
+#	$Id: rcs2clog,v 1.2 1992/02/05 04:31:18 eggert Exp eggert $
 
 # Generate a change log prefix from RCS/* and the existing ChangeLog (if any).
 # Output the new prefix to standard output.
@@ -35,9 +35,11 @@
 datearg=-d'>1970'
 if test -s ChangeLog
 then
-	date=`sed 1q <ChangeLog` || exit
-	set x $date; shift
-	datearg="-d>$1 $2 $3 $4 $5"
+	e='s/^\(...\) \(...\) \(..\) \(..:..:..\) \(....\) .*/\1 \2 \3 \4 \5/p; 1q'
+	date=`sed -n "$e" <ChangeLog` || exit
+	case $date in
+	?*) datearg="-d>$date"
+	esac
 fi
 
 rlogout=/tmp/chg$$