aboutsummaryrefslogtreecommitdiff
path: root/contrib/kiss-message
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-04 11:07:42 +0000
committermerakor <cem@ckyln.com>2020-05-04 11:07:42 +0000
commite44132232ce4df7df6c57272d8269a6af28c028a (patch)
tree7d691a208c8dbba3b4c053aa561ed92cd939ebf0 /contrib/kiss-message
parentd7d582b45e4198212e74d6b3748a4df060e85c0e (diff)
downloadcpt-e44132232ce4df7df6c57272d8269a6af28c028a.tar.gz
contrib: add kiss-message
FossilOrigin-Name: 29e9cbbc34a607525682778509a269cb3439a0243cc964904d88b6dd4b73b400
Diffstat (limited to 'contrib/kiss-message')
-rwxr-xr-xcontrib/kiss-message25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/kiss-message b/contrib/kiss-message
new file mode 100755
index 0000000..c8ac865
--- /dev/null
+++ b/contrib/kiss-message
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Utility for showing package messages in the database.
+
+[ "$1" ] || {
+ printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg] [pkg]"
+ exit 0
+}
+
+for pkg do
+ # Apply basename stripping so a user could run
+ # 'kiss-message /var/db/kiss/installed/*' to see
+ # all the messages on the system.
+ pkg=${pkg##*/}
+ msg="$KISS_ROOT/var/db/kiss/installed/$pkg/message"
+
+ # Continue if no messages are available for the package.
+ [ -f "$msg" ] || continue
+
+ printf '%s\n\033[1m%s\033[m\n%s\n\n' \
+ "==============================" \
+ "$pkg" \
+ "=============================="
+ cat "$msg"
+done