aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-07-03 09:19:25 +0000
committermerakor <cem@ckyln.com>2021-07-03 09:19:25 +0000
commita01d0ab0020287f0c52537b41d644d16904f1d18 (patch)
treeda9b04d5740fc15dc67d8f37c7b1ab60a22569df
parent725e6ebb90302730fef3784069a1610083bbb6d3 (diff)
downloadcpt-a01d0ab0020287f0c52537b41d644d16904f1d18.tar.gz
pkg_repository_update(): read motd file if it exists
FossilOrigin-Name: bc6706e912f2ec21fccc05a5fcfee3a5158c277c496b574f7dcb4927a8588eb6
-rw-r--r--src/cpt-lib.in8
1 files changed, 7 insertions, 1 deletions
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"
+ }
}
}