allow -Rp combo to page through all READMEs

This modifies list_packages() to call view_readmes() if VIEW_READMES is
set (and that variable was changed from PREVIEW_READMES). And it
documents it in the manual, help output, and NEWS.
This commit is contained in:
slakmagik 2011-03-07 01:27:10 +00:00
parent d79029a5c2
commit bdcb49f2a3
3 changed files with 28 additions and 8 deletions

View File

@ -8,6 +8,9 @@ sbopkg xxxVERSIONxxx (xxxDATExxx)
main menu's list/uninstall item. (Selection state will also main menu's list/uninstall item. (Selection state will also
now be remembered.) Thanks to dmotaleite for the RFE. now be remembered.) Thanks to dmotaleite for the RFE.
* Similarly, the -R and -p flags can now be combined to page
through the READMEs of all installed packages.
MODIFICATIONS MODIFICATIONS
* Updated French man pages. Thanks to Marie-Claude Collilieux. * Updated French man pages. Thanks to Marie-Claude Collilieux.

View File

@ -362,10 +362,20 @@ options is minimized.
.\"--------------------------------------------------------------------- .\"---------------------------------------------------------------------
.TP .TP
.B \-R .B \-R
Show all the When combined with
.B -b
or
.BR -i ,
view the
.I README .I README
files of the queued packages before starting the build. files of the packages to be built/installed before starting the build
This is useful when the user wants to make a final check. process.
This is useful for making a final check.
When combined with
.BR -p ,
view the
.I README
files of all installed packages from the active repo.
.\"--------------------------------------------------------------------- .\"---------------------------------------------------------------------
.TP .TP
.B \-r .B \-r

View File

@ -517,7 +517,11 @@ list_packages() {
esac esac
done done
else else
$PAGER $PKG_LIST if [[ $VIEW_READMES ]]; then
view_readmes "Installed packages:" $README_LIST
else
$PAGER $PKG_LIST
fi
fi fi
else else
if [[ $DIAG ]]; then if [[ $DIAG ]]; then
@ -4418,7 +4422,7 @@ unset ALLOW_MULTI # If set, allow more that one instance of sbopkg running
unset BUILDLIST # List of packages to build/install (from CLI) unset BUILDLIST # List of packages to build/install (from CLI)
unset BUILD BFLAG IFLAG CHK_UPDATES GENSEARCH CHANGELOG OBSOLETESRC GETPKGS unset BUILD BFLAG IFLAG CHK_UPDATES GENSEARCH CHANGELOG OBSOLETESRC GETPKGS
unset RSYNC SEARCH UPDATE VERSION CUSTOMVER SKIP_INSTALLED PREVIEW_READMES unset RSYNC SEARCH UPDATE VERSION CUSTOMVER SKIP_INSTALLED VIEW_READMES
unset UNINSTPKG unset UNINSTPKG
SCRIPT=${0##*/} SCRIPT=${0##*/}
@ -4522,7 +4526,7 @@ while getopts ":b:cd:e:f:g:hi:kloPpqrRs:uV:v" OPT; do
unset DIAG unset DIAG
;; ;;
R ) # Preview the READMEs before building R ) # Preview the READMEs before building
PREVIEW_READMES=1 VIEW_READMES=1
unset DIAG unset DIAG
;; ;;
s ) # Name search s ) # Name search
@ -4564,7 +4568,10 @@ Options are:
-q Quiet some of the command-line output. -q Quiet some of the command-line output.
-r Sync the remote repository with the local mirror and then -r Sync the remote repository with the local mirror and then
quit. quit.
-R Preview the READMEs before starting the build process. -R When combined with -b or -i, preview the READMEs of the
packages to be built/installed before starting the build
process. When combined with -p, show the READMEs of all
installed packages from the active repo.
-s package(s) Specific search by specific package and, if found, -s package(s) Specific search by specific package and, if found,
display package information. display package information.
-u Check for an update to sbopkg. -u Check for an update to sbopkg.
@ -4733,7 +4740,7 @@ else
uncheck_installed $TMPQUEUE uncheck_installed $TMPQUEUE
fi fi
# Preview READMEs # Preview READMEs
if [[ $PREVIEW_READMES ]]; then if [[ $VIEW_READMES ]]; then
view_readmes "The active queue is:" $TMPQUEUE view_readmes "The active queue is:" $TMPQUEUE
echo echo
while :; do while :; do