diff options
author | rafan <rafan@FreeBSD.org> | 2006-08-15 16:44:19 +0000 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2006-08-15 16:44:19 +0000 |
commit | 220e5dc6c55d729dbdbd2e411d1b8b9253b0496b (patch) | |
tree | 1790b5ed8a46a6f832d497e4181e67aea7aaec26 /misc/portless | |
parent | fd09d0f5cf4b848652bcc5a591a29dd5de4fb099 (diff) | |
download | FreeBSD-ports-220e5dc6c55d729dbdbd2e411d1b8b9253b0496b.zip FreeBSD-ports-220e5dc6c55d729dbdbd2e411d1b8b9253b0496b.tar.gz |
- Update to 0.2.4
Use bash rather than /bin/sh to add -I option (case insensitive globbing).
PR: ports/102020
Submitted by: Martin Kammerhofer <dada at pluto.tugraz.at>
Approved by: Martin Kammerhofer <mkamm at gmx.net> (maintainer)
Diffstat (limited to 'misc/portless')
-rw-r--r-- | misc/portless/Makefile | 10 | ||||
-rw-r--r-- | misc/portless/files/portless.1 | 17 | ||||
-rw-r--r-- | misc/portless/files/portless.sh | 17 |
3 files changed, 33 insertions, 11 deletions
diff --git a/misc/portless/Makefile b/misc/portless/Makefile index 1c553ed..2974c7d 100644 --- a/misc/portless/Makefile +++ b/misc/portless/Makefile @@ -6,7 +6,7 @@ # PORTNAME= portless -PORTVERSION= 0.2.2 +PORTVERSION= 0.2.4 CATEGORIES= misc MASTER_SITES= # empty DISTFILES= # none @@ -15,14 +15,18 @@ EXTRACT_ONLY= # empty MAINTAINER= mkamm@gmx.net COMMENT= Quick display of files inside the FreeBSD ports tree -NO_BUILD= yes +RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash + MAN1= portless.1 MANCOMPRESSED= no PLIST_FILES= bin/portless +do-build: + ${SED} -e 's;@BASH@;${LOCALBASE}/bin/bash;g' \ + ${FILESDIR}/portless.sh >${WRKDIR}/portless do-install: - ${INSTALL_SCRIPT} ${FILESDIR}/portless.sh ${PREFIX}/bin/portless + ${INSTALL_SCRIPT} ${WRKDIR}/portless ${PREFIX}/bin ${INSTALL_MAN} ${FILESDIR}/portless.1 ${PREFIX}/man/man1 .include <bsd.port.mk> diff --git a/misc/portless/files/portless.1 b/misc/portless/files/portless.1 index 0ba11a8..2b0e51c 100644 --- a/misc/portless/files/portless.1 +++ b/misc/portless/files/portless.1 @@ -22,11 +22,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)portless.1,v 1.6 2006/07/06 10:41:39 martin Exp +.\" @(#)portless.1,v 1.7 2006/08/13 10:23:14 martin Exp .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd July 6, 2006 +.Dd August 13, 2006 .Dt PORTLESS 1 .Os .Sh NAME @@ -34,7 +34,7 @@ .Nd "quickly browse port descriptions" .Sh SYNOPSIS .Nm -.Op Fl dfiMmp +.Op Fl dfIiMmp .Op Fl P Ar pager .Ar portglob... .Nm @@ -55,6 +55,17 @@ file of the port. This is the default. Take the .Ar portglob argument literal (not as a shell glob). +.It Fl I +Ignore case when matching +.Ar portglob +against the ports tree. This option is only effective when +.Ar portglob +contains at least one unquoted globbing meta-character ( +.Sq Li * , +.Sq Li \&? , +or +.Sq Li [ +). .It Fl i Display the .Pa distinfo diff --git a/misc/portless/files/portless.sh b/misc/portless/files/portless.sh index e682fdd..27d0aee 100644 --- a/misc/portless/files/portless.sh +++ b/misc/portless/files/portless.sh @@ -1,6 +1,6 @@ -#! /bin/sh -- +#! @BASH@ -- # (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*- -# @(#)portless.sh,v 1.8 2006/07/06 10:32:01 martin Exp +# @(#)portless.sh,v 1.11 2006/08/13 10:23:14 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 w; do +for opt in d f I i M m p w; do eval opt_$opt="" done PORTSDIR=${PORTSDIR:-/usr/ports} @@ -45,7 +45,7 @@ usage() echo >&2 "$Script: $1" shift done - echo >&2 "usage: $Script [-dfiMmp] [-P pager] 'portglob'..." + echo >&2 "usage: $Script [-dfIiMmpw] [-P pager] 'portglob'..." exit 64 # EX_USAGE } @@ -60,12 +60,15 @@ addopt() } # process options -while getopts "D:dfiMmpP:wx" option +while getopts "D:dfIiMmpP:wx" option do case "$option" in (D) PORTSDIR="$OPTARG";; # undocumented (d) addopt d "$PKGDESCR";; (f) opt_f="f";; + (I) shopt -s nocaseglob || + usage "Option -I needs bash!" + opt_I="I";; (i) addopt i "distinfo";; (M) addopt M "Makefile";; (m) addopt m "pkg-message";; @@ -82,6 +85,8 @@ 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="." +elif [ -n "$opt_f" -a -n "$opt_I" ]; then + usage "only one of options -f and -I is useful" else [ -n "$filelist" ] || filelist="$PKGDESCR" fi @@ -100,6 +105,7 @@ page() { dirglob=$1 portglob=$2 shift 2 + set +f for f in $filelist; do if [ -n "$opt_f" ]; then set -- "$@" "$PORTSDIR"$dirglob"$portglob/$f" @@ -112,6 +118,7 @@ page() { # main for p in "$@"; do + set -f set -- $p [ $# != 1 ] && usage "portglob '$p' contains whitespace!" case "$p" in |