From 6a59d6425ff6ed4b05066d9edcd8c52d4f9b095b Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Mon, 31 Mar 2008 03:35:31 +0000 Subject: [PATCH] use slakmagiks tweak for the show_readme function. It now works much better, thanks! --- src/usr/bin/sbopkg | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 68e74d0..c4f3748 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -364,19 +364,12 @@ SRCNAME=${DOWNLOAD##*/} show_readme () { # Show the package's text files. -# I am still not happy with how this works and am trying to think -# of a better way to have these 4 docs available for viewing from the -# cli. Maybe have -s just return the readme, as the result of a -# search, and maybe have another option like -v to view all 4 docs? -# Also, maybe have a way for the user to choose which of the 4 docs he -# wants to view? Or have a menu listing the 4 docs? Undecided. -SBODOCS="README $PKGNAME.SlackBuild $PKGNAME.info slack-desc" -for i in $SBODOCS; do - echo - echo "Viewing "$i":" - ${PAGER:-more} $PKGPATH/$i - read # This was added because README was scrolling past too quickly -done +# Thanks to slakmagik, this works much better. I may still look at +# other ways to do this. Perhaps have a way for the user to choose +# which of the 4 docs he wants to view? Or have a menu listing +# the 4 docs? Undecided. +${PAGER:-more} $PKGPATH/{README,$PKGNAME.SlackBuild,$PKGNAME.info,\ +slack-desc} return 0 }