Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2006 05:09:57 -0500 (EST)
From:      "Jeffrey H. Johnson" <CPE1704TKS@bellsouth.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        CPE1704TKS@bellsouth.net
Subject:   ports/92146: [NEW PORT] misc/newer: An implementation of AT&T Research UNIX V8 newer(1)
Message-ID:  <20060122100957.4F30739833@offworld.cqasys.com>
Resent-Message-ID: <200601221020.k0MAK46e018543@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92146
>Category:       ports
>Synopsis:       [NEW PORT] misc/newer: An implementation of AT&T Research UNIX V8 newer(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 22 10:20:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jeffrey H. Johnson
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD offworld.cqasys.com 6.0-STABLE FreeBSD 6.0-STABLE #21: Wed Jan 18 22:35:45 EST 2006
>Description:
In porting at least one old shell script, newer was expected.

-x-

> There doesn't appear to be any decent way to compare the last modified
> times of files from the shell...

Before everybody starts inventing their own names for this, it should be
noted that V8 already has a program for this, newer(1).  It takes two
filenames as arguments, and exits with status 0 if and only if either
(a) the first exists and the second does not, or (b) both exist and the
first's modification time is at least as recent as the second's.  Other-
wise it exits with non-zero status.  (The preceding two sentences are
essentially the whole of the manual page for it.)
 
Relatively few people have V8, but in the absence of any other precedent
for what this facility should look like, it seems reasonable to follow
V8's lead:

newer file1 file2

exit with 0 status if file1 exists and file2 does not, or if file1's last
modified time is at least as recent as file2's.

-x-

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- newer-1.0.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	newer
#	newer/Makefile
#	newer/distinfo
#	newer/pkg-descr
#
echo c - newer
mkdir -p newer > /dev/null 2>&1
echo x - newer/Makefile
sed 's/^X//' >newer/Makefile << 'END-of-newer/Makefile'
X# New ports collection makefile for:    newer
X# Date created:         22 January 2006
X# Whom:                 Jeffrey H. Johnson <CPE1704TKS@bellsouth.net>
X#
X# $FreeBSD: ports/misc/newer/Makefile,v 1.00 2006/01/22 04:43:41 trn Exp $
X#
X
XPORTNAME=	newer
XPORTVERSION=	1.0
XCATEGORIES=	misc
XMASTER_SITES=	ftp://ftp.cwru.edu/pub/chet/
XDISTFILES=	newer.c
X
XMAINTAINER=	CPE1704TKS@bellsouth.net
XCOMMENT=	An implementation of AT&T Research UNIX V8 newer(1)
X
XEXTRACT_ONLY=
X
XPLIST_FILES=	bin/newer
XNO_EXTRACT=	yes
X
Xdo-build:
X	${CP} ${DISTDIR}/newer.c ${WRKDIR}/newer.c
X	${CC} ${CFLAGS} -o ${WRKDIR}/newer ${WRKDIR}/newer.c
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKDIR}/newer ${PREFIX}/bin
X
X.include <bsd.port.mk>
END-of-newer/Makefile
echo x - newer/distinfo
sed 's/^X//' >newer/distinfo << 'END-of-newer/distinfo'
XMD5 (newer.c) = b21df1d77cfa2a7559d2e9cd6e0ca841
XSHA256 (newer.c) = 42117fa1b4fe735742bc5be1e73e80cffb041ae264290432ae5dc7faa292d0d4
XSIZE (newer.c) =  1539
END-of-newer/distinfo
echo x - newer/pkg-descr
sed 's/^X//' >newer/pkg-descr << 'END-of-newer/pkg-descr'
X> There doesn't appear to be any decent way to compare the last modified
X> times of files from the shell...
X
XBefore everybody starts inventing their own names for this, it should be
Xnoted that V8 already has a program for this, newer(1).  It takes two
Xfilenames as arguments, and exits with status 0 if and only if either
X(a) the first exists and the second does not, or (b) both exist and the
Xfirst's modification time is at least as recent as the second's.  Other-
Xwise it exits with non-zero status.  (The preceding two sentences are
Xessentially the whole of the manual page for it.)
X 
XRelatively few people have V8, but in the absence of any other precedent
Xfor what this facility should look like, it seems reasonable to follow
XV8's lead:
X
Xnewer file1 file2
X
Xexit with 0 status if file1 exists and file2 does not, or if file1's last
Xmodified time is at least as recent as file2's.
END-of-newer/pkg-descr
exit
--- newer-1.0.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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