diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:16:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:16:13 +0000 |
commit | e90fcc54809db2591dc083f43ef54c6ec8c60847 (patch) | |
tree | f20bc206c3c2d5d59d37c46c5cf5d53a20642556 /scripts/newer | |
parent | Initial commit. (diff) | |
download | exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.tar.xz exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.zip |
Adding upstream version 4.96.upstream/4.96upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/newer')
-rwxr-xr-x | scripts/newer | 21 |
1 files changed, 21 insertions, 0 deletions
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 |