aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2006-08-16 00:44:19 +0800
committerrafan <rafan@FreeBSD.org>2006-08-16 00:44:19 +0800
commit220e5dc6c55d729dbdbd2e411d1b8b9253b0496b (patch)
tree1790b5ed8a46a6f832d497e4181e67aea7aaec26 /ports-mgmt
parentfd09d0f5cf4b848652bcc5a591a29dd5de4fb099 (diff)
downloadfreebsd-ports-graphics-220e5dc6c55d729dbdbd2e411d1b8b9253b0496b.tar.gz
freebsd-ports-graphics-220e5dc6c55d729dbdbd2e411d1b8b9253b0496b.tar.zst
freebsd-ports-graphics-220e5dc6c55d729dbdbd2e411d1b8b9253b0496b.zip
- 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 'ports-mgmt')
-rw-r--r--ports-mgmt/portless/Makefile10
-rw-r--r--ports-mgmt/portless/files/portless.117
-rw-r--r--ports-mgmt/portless/files/portless.sh17
3 files changed, 33 insertions, 11 deletions
diff --git a/ports-mgmt/portless/Makefile b/ports-mgmt/portless/Makefile
index 1c553ed2de9..2974c7d9b03 100644
--- a/ports-mgmt/portless/Makefile
+++ b/ports-mgmt/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/ports-mgmt/portless/files/portless.1 b/ports-mgmt/portless/files/portless.1
index 0ba11a8e5ce..2b0e51c52ca 100644
--- a/ports-mgmt/portless/files/portless.1
+++ b/ports-mgmt/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/ports-mgmt/portless/files/portless.sh b/ports-mgmt/portless/files/portless.sh
index e682fddcd2e..27d0aee134a 100644
--- a/ports-mgmt/portless/files/portless.sh
+++ b/ports-mgmt/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