From 39ce00b8d520cbecbd6af87257e8fb11df0ec273 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 11:44:07 +0200 Subject: Adding upstream version 4.94.2. Signed-off-by: Daniel Baumann --- scripts/newer | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/newer (limited to 'scripts/newer') diff --git a/scripts/newer b/scripts/newer new file mode 100755 index 0000000..24c09e8 --- /dev/null +++ b/scripts/newer @@ -0,0 +1,21 @@ +#! /bin/sh + +# Script to determine whether the first file is newer than the second. +# If the first does not exist, the answer is "no"; +# if the second does not exist, the answer is "yes"; +# otherwise their ages are compared using "find". + +if [ $# -ne 2 ]; then + echo "*** Two file names needed for 'newer' ***" + exit 2; +fi + +if [ ! -f $1 ]; then exit 1; fi +if [ ! -f $2 ]; then exit 0; fi + +case `find $1 -newer $2 -print` in +'') exit 1;; +*) exit 0;; +esac + +# End -- cgit v1.2.3