svn commit: r217831 - head/usr.bin/man

Ulrich Spoerlein uqs at FreeBSD.org
Tue Jan 25 18:32:22 UTC 2011


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


More information about the svn-src-head mailing list