move -q to -g (general search) and create new -q for 'quiet' which will quiet down the command line output a bit; remove some old comments in sbopkg re: kate; include little fixlet bug from slakmagik where cursor would not appear after pressing control-c; update sbopkg.8 man page regarding -g and -q (and also add in undocumented -u, check for update to sbopkg); update ChangeLog-current.txt

This commit is contained in:
chess.griffin 2009-02-23 22:23:50 +00:00
parent 3a55e8b3ef
commit 007c21b423
3 changed files with 49 additions and 21 deletions

View file

@ -7,9 +7,10 @@ enhancements:
the user wants to load a saved queue, show a list of available saved
queues; thanks to slakmagik for the patch.
* Add ability to search for keywords in the README files using regular
expressions; thanks to slakmagik for the original patch and implementation
and thanks to both slakmagik and Mauro Giachero for cleaning it up and
addressing minor issues before the commit.
expressions; this new 'string search' can also be narrowed to only search
installed packages; thanks to slakmagik for the original patch and
implementation and thanks to both slakmagik and Mauro Giachero for
cleaning it up and addressing minor issues before the commit.
* Commit a cleanup/misc patch from slakmagik that removes some useless code
and fixes some style issues; thanks to slakmagik for the patch.
* Allow user to interrupt/abort the update progressbar by pressing ESC;
@ -30,6 +31,10 @@ enhancements:
* Allow the usage of the -d, -f and -v command-line options in dialog mode,
and spit an error message when the command line contains unrecognized
tokens.
* Move the -q option to -g (General search) in order to make way for -q,
'quiet mode' where the output of some of the command line options (i.e.
the command line progressbar) can be minimized. More quieting will likely
occur in future releases. Thanks to alkos333 for the feature request
* Implement a workaround so that the dialog interface now works better with
GNU Screen and rxvt-based terminals. Thanks to Phillip Warner for raising
the issue and thanks to Mauro Giachero for working on the implementation.

View file

@ -372,8 +372,13 @@ function progressbar () {
local MESSAGE=$(crunch "$2")
local MESSAGELINES=$(echo "$MESSAGE" |fmt -66 |wc -l)
dialog --title "$1" --gauge "$MESSAGE" $(($MESSAGELINES + 5)) 70 0
else
elif [[ ! "$QUIET" ]]; then
progressbar_cli "$1" "$2"
else
#if [[ -n "$1" ]]; then
# echo "[ $1 ]"
#fi
cat >/dev/null
fi
}
@ -1125,7 +1130,7 @@ load_user_queue () {
leave this menu.")"
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/} #"} # FIXME workaround for kate
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
if [ -r $FILE ]; then
# this inhibits add_item_to_queue's msgbox for each added app
touch $TMP/sbopkg_user_queue.lck
@ -1149,7 +1154,7 @@ delete_user_queue() {
leave this menu.")"
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/} #"} # FIXME workaround for kate
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
if ! rm -f $FILE 2>/dev/null; then
dialog --title "ERROR" --msgbox \
"You do not have permission to remove $FILE" 0 0
@ -1190,7 +1195,7 @@ rename_user_queue() {
# I have to assign to this because I shrink the array later
COUNTER=${#USERQUEUE[*]}
for ((i=0; i<$COUNTER; i++)); do
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/} #"} # FIXME workaround for kate
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
if [ -w "${FILE%/*}" ]; then
# This loops so the user can be brought back to the inputbox on a
# failure (continue) or back to the dir lister on success (break)
@ -2754,6 +2759,9 @@ cleanup () {
echo
exit 0
else
if $HAS_NCURSES; then
tput cnorm # Restore cursor
fi
rm -f $TMP/sbopkg_*
rm -f $TMP/sbopkgpidlist
rm -rf $TMP/sbooutput
@ -2916,8 +2924,9 @@ main_menu () {
# script when it is first run.
DIAG=1
unset QUIET
# This is the command line options and help.
while getopts ":b:cd:f:hi:lopq:rs:uv:" OPT; do
while getopts ":b:cd:f:g:hi:lopqrs:uv:" OPT; do
case $OPT in
b ) BFLAG=1
BUILDPKGS=1
@ -2931,6 +2940,9 @@ while getopts ":b:cd:f:hi:lopq:rs:uv:" OPT; do
;;
f ) SBOPKG_CONF="$OPTARG"
;;
g ) GENSEARCH="$OPTARG"
unset DIAG
;;
i ) IFLAG=1
BUILDPKGS=1
INSTALLPKGS=1
@ -2946,7 +2958,7 @@ while getopts ":b:cd:f:hi:lopq:rs:uv:" OPT; do
p ) GETPKGS=1
unset DIAG
;;
q ) GENSEARCH="$OPTARG"
q ) QUIET=1
unset DIAG
;;
r ) RSYNC=1
@ -2969,20 +2981,22 @@ Options are:
-c Check for updates to installed SlackBuilds.org packages.
-d localdir Location of local copy of SlackBuilds.org repository
-f Override default configuration file with specified file.
-g package(s) General search for packages matching string.
-h Display this help message.
-i package(s) Build and install package(s).
-l Display the SlackBuilds.org ChangeLog.txt and then quit.
-o Display the obsoleted source files and prompt for deletion.
-p List installed SlackBuilds.org packages.
-q package(s) Query for packages matching string.
-q Quiet some of the command-line output.
-r Rsync the SlackBuilds.org repository with
the local mirror and then quit.
-s package(s) Search by specific package name and, if found,
-s package(s) Specific search by specific package and, if found,
display package information.
-u Check for an update to sbopkg.
-v version Set the Slackware version for the
mirror (current choices are 11.0, 12.0, 12.1, and 12.2)
Note: multiple arguments to -b, -i, -q, and -s must be quoted ("pkg1 pkg2")
Note: multiple arguments to -b, -g, -i, and -s must be quoted ("pkg1 pkg2")
EOF
exit
;;

View file

@ -92,6 +92,16 @@ Override the default configuration file, which is located by
default at /etc/sbopkg/sbopkg.conf, with another configuration
file.
.TP 5
.B -g PACKAGE(s)
General search for PACKAGE(s) by glob. For example:
#sbopkg -g nv
will return a list of matches, such as the nvidia packages,
konversation, and other packages with 'nv' in their name. If more
than one glob is specified, they must be in quotes.
.TP 5
.B -h
Display the help.
@ -136,14 +146,9 @@ source files only used in the "other" repository will be listed.
List installed SlackBuilds.org packages.
.TP 5
.B -q PACKAGE(s)
Query for PACKAGE(s) by glob. For example:
#sbopkg -q nv
will return a list of matches, such as the nvidia packages,
konversation, and other packages with 'nv' in their name. If more
than one glob is specified, they must be in quotes.
.B -q
Enable the "quiet mode." When this flag is specified, the output of
some of the command-line options is minimized.
.TP 5
.B -r
@ -151,7 +156,7 @@ Rsync the local repository with SlackBuilds.org and quit.
.TP 5
.B -s PACKAGE(s)
Search for PACKAGE(s) by specific PACKAGE name and, if found, display
Specific search for PACKAGE(s) by PACKAGE name and, if found, display
the README, SlackBuild, .info, and slack-desc files in that order
using $PAGER, which defaults to 'more' as described above. If more
than one package is specified, they must be in quotes. For example:
@ -160,6 +165,10 @@ than one package is specified, they must be in quotes. For example:
will search for foo and then bar.
.TP 5
.B -u
Check for an update to sbopkg itself and then quit.
.TP 5
.B -v VERSION
Set the Slackware version to use for the matching local SBo mirror.