File rmlint-issue-679-illegal-number.patch of Package rmlint
From 28d58815b2c72f5e2b1148fa5dcfc8c0670344e7 Mon Sep 17 00:00:00 2001
From: Ray Oei <10501445+RayOei@users.noreply.github.com>
Date: Sat, 1 Mar 2025 00:35:26 +0100
Subject: [PATCH] Fix #679 Illegal number error
---
lib/formats/sh.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/formats/sh.sh b/lib/formats/sh.sh
index d51d5285..a0492deb 100644
--- a/lib/formats/sh.sh
+++ b/lib/formats/sh.sh
@@ -130,11 +130,9 @@ check_for_equality() {
if [ -f "$1" ]; then
# Use the more lightweight builtin `cmp` for regular files:
cmp -s "$1" "$2"
- echo $?
else
# Fallback to `rmlint --equal` for directories:
"$RMLINT_BINARY" -p --equal %s "$1" "$2"
- echo $?
fi
}
@@ -159,7 +157,8 @@ original_check() {
if [ -z "$DO_PARANOID_CHECK" ]; then
return 0
else
- if [ "$(check_for_equality "$1" "$2")" -ne "0" ]; then
+ # Check latest result.
+ if ! check_for_equality "$1" "$2"; then
echo "${COL_RED}^^^^^^ Error: files no longer identical - cancelling.....${COL_RESET}"
return 1
fi