From e1b46f0d1ae3576a1908829c174b7053428a4e07 Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Wed, 9 Apr 2008 14:14:46 +0000 Subject: [PATCH] change search options again; now -q for query is the switch to search by string and -s is the old search by specific package name; these switches make more sense; update sbopkg.8 man page; update TODO --- src/usr/bin/sbopkg | 18 +++++++++--------- src/usr/doc/TODO | 6 ++++-- src/usr/man/man8/sbopkg.8 | 36 ++++++++++++++++++------------------ 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index e136809..a0d131f 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -682,7 +682,7 @@ if [ $# -eq 0 ]; then fi # This is the command line options and help -while getopts ":b:d:f:i:hlrs:v:" OPT; do +while getopts ":b:d:f:hlq:rs:v:" OPT; do case $OPT in b ) BUILD="$OPTARG" ;; @@ -690,13 +690,13 @@ while getopts ":b:d:f:i:hlrs:v:" OPT; do ;; f ) SBOPKG_CONF="$OPTARG" ;; - i ) SEARCH="$OPTARG" - ;; l ) CHANGELOG=1 ;; + q ) GENSEARCH="$OPTARG" + ;; r ) RSYNC=1 ;; - s ) GENSEARCH="$OPTARG" + s ) SEARCH="$OPTARG" ;; v ) VERSION=1 CUSTOMVER="$OPTARG" @@ -712,18 +712,18 @@ SlackBuilds.org repository" echo " -f Override default configuration file" echo " with specified file." echo " -h Display this help message." - echo " -i package Search by specific package name and, \ -if found," - echo " display package information." echo " -l Display the SlackBuilds.org \ ChangeLog.txt and then quit." + echo " -q package Query for packages matching string." echo " -r Rsync the SlackBuilds.org repository with" echo " the local mirror and then quit." - echo " -s package General search for a package name." + echo " -s package Search by specific package name and, \ +if found," + echo " display package information." echo " -v version Set the Slackware version for the" echo " mirror (current choices are 11.0 and 12.0)" echo - echo "Note: multiple arguments to -b, -i, and -s must be \ + echo "Note: multiple arguments to -b, -q, and -s must be \ quoted (\"pkg1 pkg2\")" exit ;; diff --git a/src/usr/doc/TODO b/src/usr/doc/TODO index 1c8943a..8c43b19 100644 --- a/src/usr/doc/TODO +++ b/src/usr/doc/TODO @@ -15,10 +15,12 @@ Sbopkg TODO (in no particular order) checklist or radiolist would not present the current 'view' menu. Not sure how the order of packages selected would be set. * Add ability to view more than just the README from the command line. - This was added, but it needs to be improved. + This was added, but it needs to be improved. UPDATED: This works + much better now. * Include ability to work with more than one repo with different Slackware versions, i.e. /home/sbo/11.0 and /home/sbo/12.0. The first menu in the dialog after selecting "Browse" would be a menu - showing the various Slackware versions in the local mirror. + showing the various Slackware versions in the local mirror. UPDATED: + This has been added to SVN and should appear in version 0.0.6. * More error checking. * General code cleanups. diff --git a/src/usr/man/man8/sbopkg.8 b/src/usr/man/man8/sbopkg.8 index c031991..a7fcdd5 100644 --- a/src/usr/man/man8/sbopkg.8 +++ b/src/usr/man/man8/sbopkg.8 @@ -64,7 +64,7 @@ than one package is specified, they must be in quotes. For example .TP 5 .B -d DIRECTORY Manually specify the full path to the DIRECTORY containing the -local SBo repository +local SBo repository. .TP 5 .B -f @@ -74,29 +74,29 @@ file. .TP 5 .B -h -Display the help +Display the help. .TP 5 -.B -i PACKAGE(s) +.B -l +Display the SBo ChangeLog.txt and quit. + +.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. + +.TP 5 +.B -r +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 the README, SlackBuild, .info, and slack-desc files in that order using $PAGER, which defaults to 'more' as decribed above. If more than one package is specified, they must be in quotes. For example -"sbopkg -i "foo bar". - -.TP 5 -.B -l -Display the SBo ChangeLog.txt and quit - -.TP 5 -.B -r -Rsync the local repository with SlackBuilds.org and quit - -.TP 5 -.B -s PACKAGE(s) -Search for PACKAGE(s) by glob. For example, 'sbopkg -s nv' will return -a list of matches, such as the nvidia packages, konversation, and -other packages with 'nv' in their name. +"sbopkg -s "foo bar". .TP 5 .B -v VERSION