From a01d0ab0020287f0c52537b41d644d16904f1d18 Mon Sep 17 00:00:00 2001
From: merakor <cem@ckyln.com>
Date: Sat, 3 Jul 2021 09:19:25 +0000
Subject: pkg_repository_update(): read motd file if it exists

FossilOrigin-Name: bc6706e912f2ec21fccc05a5fcfee3a5158c277c496b574f7dcb4927a8588eb6
---
 src/cpt-lib.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 245aa21..6bb12bd 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1618,7 +1618,13 @@ pkg_repository_update() {
 
         # Repositories can contain a "Message of the Day" file in order to
         # relay important information to their users.
-        ! [ -r "$repo_root/motd" ] || cat "$repo_root/motd"
+        ! [ -r "$repo_root/motd" ] || {
+            printf '%s\n%s\n%s\n\n' \
+                "$(_multiply_char '=' 60)" \
+                "Message of the Day [$PWD]" \
+                "$(_multiply_char '=' 60)"
+            cat "$repo_root/motd"
+        }
     }
 }
 
-- 
cgit v1.2.3