prtrej: use cmp instead of diff

This commit is contained in:
John McQuah 2024-02-13 15:07:46 +00:00
parent c749f5c595
commit dfe2a87820

View File

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
# #
# $Id: prtrej,v 1.4 2004/02/06 11:30:00 opel Exp $ # $Id: prtrej,v 1.4 2023/12/21 01:30:00 jmq Exp $
# (c) 2003,2004 by Martin Opel <mo@obbl-net.de>
# (c) 2002 by Markus Ackermann <maol@symlink.ch> # (c) 2002 by Markus Ackermann <maol@symlink.ch>
# (c) 2003,2004 by Martin Opel <mo@obbl-net.de>
# (c) 2023 by John McQuah
# #
# may be redistributed and modified under the terms of the GPL # may be redistributed and modified under the terms of the GPL
# only usable with CRUX Linux, version 0.9.2 or higher # only usable with CRUX Linux, version 0.9.2 or higher
@ -57,7 +58,7 @@ for reject in "${REJECTS[@]}"; do
# This cleanup could be incorporated directly into pkgrm, but until that # This cleanup could be incorporated directly into pkgrm, but until that
# happens we might as well do the cleanup here. # happens we might as well do the cleanup here.
# #
if [ ! -e "$real" ] || diff "$real" "$reject" >/dev/null; then if [ ! -e "$real" ] || cmp -s "$real" "$reject"; then
rm "$reject" rm "$reject"
count=$(( count + 1 )) count=$(( count + 1 ))
else else