- update to 0.2.2

- Added option -w to report matching port directories.

PR:		ports/100014
Submitted by:	maintainer (Martin Kammerhofer)
This commit is contained in:
Cheng-Lung Sung 2006-07-10 07:53:48 +00:00
parent 6b14db7984
commit dc2fc40ccd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=167339
6 changed files with 64 additions and 14 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= portless
PORTVERSION= 0.2.1
PORTVERSION= 0.2.2
CATEGORIES= misc
MASTER_SITES= # empty
DISTFILES= # none

View file

@ -22,11 +22,11 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)portless.1,v 1.4 2006/06/15 15:43:43 martin Exp
.\" @(#)portless.1,v 1.6 2006/07/06 10:41:39 martin Exp
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
.Dd June 15, 2006
.Dd July 6, 2006
.Dt PORTLESS 1
.Os
.Sh NAME
@ -37,6 +37,9 @@
.Op Fl dfiMmp
.Op Fl P Ar pager
.Ar portglob...
.Nm
.Op Fl w
.Ar portglob...
.Sh DESCRIPTION
.Nm
lets FreeBSD users quickly browse port descriptions given the port's
@ -74,6 +77,12 @@ Use the specified
program to display matching files. This overrides the setting of the
.Ev PAGER
environment variable.
.It Fl w
Rather than browsing files inside the ports tree just echo the names
of directories matching
.Ar portglob
to stdout.
This option is incompatible with all other options.
.El
.Sh ENVIRONMENT
The
@ -99,9 +108,18 @@ command:
.Dl "portless cvsweb\e*"
.Dl "portless lang/\e*doc"
.Dl "portless 'www/*python*'"
.Sh SEE ALSO
.Xr ports_glob 1
from the
.Pa sysutils/portupgrade
port
.Sh AUTHOR
The
.Nm
utility and this manual page were written by
.An Martin Kammerhofer Aq mkamm@gmx.net .
.Sh BUGS
The
.Fl w
option is a retrofitted hack.
.\" EOF

View file

@ -1,6 +1,6 @@
#! /bin/sh --
# (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*-
# @(#)portless.sh,v 1.7 2006/06/14 13:02:37 martin Exp
# @(#)portless.sh,v 1.8 2006/07/06 10:32:01 martin Exp
# Show "pkg-descr" file of matching port(s).
#
# Copyright (c) 2006 Martin Kammerhofer <mkamm@gmx.net>
@ -29,7 +29,7 @@
Script=`basename $0` # name of this script
# set defaults
for opt in d f i M m p; do
for opt in d f i M m p w; do
eval opt_$opt=""
done
PORTSDIR=${PORTSDIR:-/usr/ports}
@ -60,7 +60,7 @@ addopt()
}
# process options
while getopts "D:dfiMmpP:x" option
while getopts "D:dfiMmpP:wx" option
do
case "$option" in
(D) PORTSDIR="$OPTARG";; # undocumented
@ -71,13 +71,20 @@ while getopts "D:dfiMmpP:x" option
(m) addopt m "pkg-message";;
(p) addopt p "pkg-plist";;
(P) PAGER="$OPTARG";;
(w) opt_w="w";;
(x) set -x;; # undocumented
(*) usage;;
esac
done
shift $(($OPTIND - 1))
[ -d "$PORTSDIR" ] || fatal "No such directory '$PORTSDIR'"
[ -n "$filelist" ] || filelist="$PKGDESCR"
if [ -n "$opt_w" ]; then
[ -n "$filelist" ] && usage "option -w not compatible with other options"
PAGER="/bin/ls -1d" # just echo directory name(s)
filelist="."
else
[ -n "$filelist" ] || filelist="$PKGDESCR"
fi
# there must be at least one argument
if [ $# = 0 ]; then

View file

@ -6,7 +6,7 @@
#
PORTNAME= portless
PORTVERSION= 0.2.1
PORTVERSION= 0.2.2
CATEGORIES= misc
MASTER_SITES= # empty
DISTFILES= # none

View file

@ -22,11 +22,11 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)portless.1,v 1.4 2006/06/15 15:43:43 martin Exp
.\" @(#)portless.1,v 1.6 2006/07/06 10:41:39 martin Exp
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
.Dd June 15, 2006
.Dd July 6, 2006
.Dt PORTLESS 1
.Os
.Sh NAME
@ -37,6 +37,9 @@
.Op Fl dfiMmp
.Op Fl P Ar pager
.Ar portglob...
.Nm
.Op Fl w
.Ar portglob...
.Sh DESCRIPTION
.Nm
lets FreeBSD users quickly browse port descriptions given the port's
@ -74,6 +77,12 @@ Use the specified
program to display matching files. This overrides the setting of the
.Ev PAGER
environment variable.
.It Fl w
Rather than browsing files inside the ports tree just echo the names
of directories matching
.Ar portglob
to stdout.
This option is incompatible with all other options.
.El
.Sh ENVIRONMENT
The
@ -99,9 +108,18 @@ command:
.Dl "portless cvsweb\e*"
.Dl "portless lang/\e*doc"
.Dl "portless 'www/*python*'"
.Sh SEE ALSO
.Xr ports_glob 1
from the
.Pa sysutils/portupgrade
port
.Sh AUTHOR
The
.Nm
utility and this manual page were written by
.An Martin Kammerhofer Aq mkamm@gmx.net .
.Sh BUGS
The
.Fl w
option is a retrofitted hack.
.\" EOF

View file

@ -1,6 +1,6 @@
#! /bin/sh --
# (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*-
# @(#)portless.sh,v 1.7 2006/06/14 13:02:37 martin Exp
# @(#)portless.sh,v 1.8 2006/07/06 10:32:01 martin Exp
# Show "pkg-descr" file of matching port(s).
#
# Copyright (c) 2006 Martin Kammerhofer <mkamm@gmx.net>
@ -29,7 +29,7 @@
Script=`basename $0` # name of this script
# set defaults
for opt in d f i M m p; do
for opt in d f i M m p w; do
eval opt_$opt=""
done
PORTSDIR=${PORTSDIR:-/usr/ports}
@ -60,7 +60,7 @@ addopt()
}
# process options
while getopts "D:dfiMmpP:x" option
while getopts "D:dfiMmpP:wx" option
do
case "$option" in
(D) PORTSDIR="$OPTARG";; # undocumented
@ -71,13 +71,20 @@ while getopts "D:dfiMmpP:x" option
(m) addopt m "pkg-message";;
(p) addopt p "pkg-plist";;
(P) PAGER="$OPTARG";;
(w) opt_w="w";;
(x) set -x;; # undocumented
(*) usage;;
esac
done
shift $(($OPTIND - 1))
[ -d "$PORTSDIR" ] || fatal "No such directory '$PORTSDIR'"
[ -n "$filelist" ] || filelist="$PKGDESCR"
if [ -n "$opt_w" ]; then
[ -n "$filelist" ] && usage "option -w not compatible with other options"
PAGER="/bin/ls -1d" # just echo directory name(s)
filelist="."
else
[ -n "$filelist" ] || filelist="$PKGDESCR"
fi
# there must be at least one argument
if [ $# = 0 ]; then