cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 00ed3b8b1bb05dac3b4446d49d16abc6510e9c4c
parent 363ee63281939d2dd57f1e4d1a9f26abb50a2b14
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  4 May 2020 14:07:43 +0300

contrib: add kiss-message

Diffstat:
Acontrib/kiss-message | 25+++++++++++++++++++++++++
Mman/kiss-contrib.1 | 9+++++++++
2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/contrib/kiss-message 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 diff --git a/man/kiss-contrib.1 b/man/kiss-contrib.1 @@ -102,6 +102,15 @@ Prints the manifest file. <pkg> Prints the manifest file in a tree view. +.SH KISS-MESSAGE +.B kiss-message +<pkg> [pkg] [pkg] + +Outputs the messages of the given packages. A user could run +.IP +kiss-message /var/db/kiss/installed/* +.PP +to see all the messages they have. .SH KISS-NEW .B kiss-new <name> [version] [sources]