git: 4a51f972d1a9 - main - Mk/Scripts/makesum.sh: Fix for distinfo files with nothing but a TIMESTAMP

From: Tijl Coosemans <tijl_at_FreeBSD.org>
Date: Sun, 25 Dec 2022 22:15:04 UTC
The branch main has been updated by tijl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4a51f972d1a9db6aa1bb93873b74674e4323049d

commit 4a51f972d1a9db6aa1bb93873b74674e4323049d
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2022-11-21 17:46:52 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2022-12-25 22:05:55 +0000

    Mk/Scripts/makesum.sh: Fix for distinfo files with nothing but a TIMESTAMP
    
    PR:             267904
---
 Mk/Scripts/makesum.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Mk/Scripts/makesum.sh b/Mk/Scripts/makesum.sh
index 1d09b7ffb82a..c9f50e56bb5d 100644
--- a/Mk/Scripts/makesum.sh
+++ b/Mk/Scripts/makesum.sh
@@ -28,7 +28,7 @@ cd "${dp_DISTDIR}"
 # So, we extract the content of the distinfo file minus the TIMESTAMP, if it
 # contains a TIMESTAMP.
 if [ -f "${dp_DISTINFO_FILE}" ] && grep -q "^TIMESTAMP " ${dp_DISTINFO_FILE}; then
-	grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD}
+	grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD} || true
 fi
 
 for file in ${dp_CKSUMFILES}; do