Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 18:32:22 +0000 (UTC)
From:      Ulrich Spoerlein <uqs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217831 - head/usr.bin/man
Message-ID:  <201101251832.p0PIWMxr046061@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: uqs
Date: Tue Jan 25 18:32:21 2011
New Revision: 217831
URL: http://svn.freebsd.org/changeset/base/217831

Log:
  Use test(1) operators and test for the catpage not being older than the
  manpage.
  
  Identical mtimes (as generated by buildworld for these files) precluded
  catpages from working.
  
  Approved by:	gordon

Modified:
  head/usr.bin/man/man.sh

Modified: head/usr.bin/man/man.sh
==============================================================================
--- head/usr.bin/man/man.sh	Tue Jan 25 17:39:52 2011	(r217830)
+++ head/usr.bin/man/man.sh	Tue Jan 25 18:32:21 2011	(r217831)
@@ -200,8 +200,8 @@ find_file() {
 # Usage: is_newer file1 file2
 # Returns true if file1 is newer than file2 as calculated by mtime.
 is_newer() {
-	if [ $(stat -f %m $1) -gt $(stat -f %m $2) ]; then
-		decho "    mtime: $1 newer than $2" 3
+	if ! [ "$1" -ot "$2" ]; then
+		decho "    mtime: $1 not older than $2" 3
 		return 0
 	else
 		decho "    mtime: $1 older than $2" 3



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101251832.p0PIWMxr046061>