1
0
Fork 0
exim4/scripts/newer
Daniel Baumann 802ab461a9
Adding upstream version 4.98.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 14:27:17 +02:00

24 lines
550 B
Bash
Executable file

#! /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".
# Copyright (c) The Exim Maintainters 2022
# SPDX-License-Identifier: GPL-2.0-or-later
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