From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 9 07:20:22 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1B0816A4C5 for ; Fri, 9 Jun 2006 07:20:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D897343D7C for ; Fri, 9 Jun 2006 07:20:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k597KJFA009205 for ; Fri, 9 Jun 2006 07:20:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k597KJSv009199; Fri, 9 Jun 2006 07:20:19 GMT (envelope-from gnats) Resent-Date: Fri, 9 Jun 2006 07:20:19 GMT Resent-Message-Id: <200606090720.k597KJSv009199@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Kammerhofer Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C9FC16A418 for ; Fri, 9 Jun 2006 07:15:19 +0000 (UTC) (envelope-from dada@sbox.tugraz.at) Received: from mailrelay1.tu-graz.ac.at (mailrelay.tu-graz.ac.at [129.27.2.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AF143D77 for ; Fri, 9 Jun 2006 07:15:17 +0000 (GMT) (envelope-from dada@sbox.tugraz.at) Received: from webmail.tugraz.at (webmail.tu-graz.ac.at [129.27.2.204]) by mailrelay1.tu-graz.ac.at (8.13.6/8.13.6) with ESMTP id k597FFo0016501 for ; Fri, 9 Jun 2006 09:15:15 +0200 (CEST) Received: from sbox.tugraz.at ([unix socket]) by sbox.tugraz.at (Cyrus v2.2.13) with LMTPA; Thu, 08 Jun 2006 12:58:14 +0200 Received: from mailrelay2.tu-graz.ac.at (mailrelay.tu-graz.ac.at [129.27.2.202]) by sbox.tugraz.at (8.13.6/8.13.6) with ESMTP id k58AwD5e009629 for ; Thu, 8 Jun 2006 12:58:13 +0200 (CEST) Received: from pluto.tugraz.at (pluto.tu-graz.ac.at [129.27.3.200]) by mailrelay2.tu-graz.ac.at (8.13.6/8.13.6) with ESMTP id k58AwBgT010217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Jun 2006 12:58:11 +0200 (CEST) Received: from pluto.tugraz.at (localhost.localdomain [127.0.0.1]) by pluto.tugraz.at (8.13.1/8.13.1) with ESMTP id k58AwAVO021089; Thu, 8 Jun 2006 12:58:10 +0200 Received: (from dada@localhost) by pluto.tugraz.at (8.13.1/8.13.1/Submit) id k58AwAI5021088; Thu, 8 Jun 2006 12:58:10 +0200 Message-Id: <200606081058.k58AwAI5021088@pluto.tugraz.at> Date: Thu, 8 Jun 2006 12:58:10 +0200 From: Martin Kammerhofer To: freebsd-bugs@FreeBSD.org Cc: dada@sbox.tugraz.at Subject: ports/98739: New port: misc/portless get port descriptions w/o much typing X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 07:20:22 -0000 >Number: 98739 >Category: ports >Synopsis: New port: misc/portless get port descriptions w/o much typing >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 09 07:20:18 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Martin Kammerhofer >Release: FreeBSD 6.1-STABLE i386 >Organization: Graz Uni >Environment: System: FreeBSD Martin.liebt.Susi 6.1-STABLE FreeBSD 6.1-STABLE #6: Wed Jun 7 12:03:19 CEST 2006 toor@Martin.liebt.Susi:/usr/src/sys/i386/compile/P2B-S i386 >Description: Lightweight and more flexible replacement for misc/portell >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # portless # portless/Makefile # portless/pkg-descr # portless/files # portless/files/portless.1 # portless/files/portless.sh # echo c - portless mkdir -p portless > /dev/null 2>&1 echo x - portless/Makefile sed 's/^X//' >portless/Makefile << 'END-of-portless/Makefile' X# New ports collection makefile for: portless X# Date created: 8 June 2006 X# Whom: Martin Kammerhofer X# X# $FreeBSD$ X# X XPORTNAME= portless XPORTVERSION= 0.1 XCATEGORIES= misc XMASTER_SITES= # empty XDISTFILES= # none XEXTRACT_ONLY= # empty X XMAINTAINER= mkamm@gmx.net XCOMMENT= Quick display of files inside the FreeBSD ports tree X XRUN_DEPENDS= less:${PORTSDIR}/sysutils/less X XNO_BUILD= yes XMAN1= portless.1 XMANCOMPRESSED= no X XPLIST_FILES= bin/portless X Xdo-install: X ${INSTALL_SCRIPT} ${FILESDIR}/portless.sh ${PREFIX}/bin/portless X ${INSTALL_MAN} ${FILESDIR}/portless.1 ${PREFIX}/man/man1 X X.include END-of-portless/Makefile echo x - portless/pkg-descr sed 's/^X//' >portless/pkg-descr << 'END-of-portless/pkg-descr' Xportless is a small shell script which lets FreeBSD users quickly browse Xport descriptions given the port's name or a glob. Basically to view Xthe descriptions of GCC (related) ports you type X portless gcc\* Xand portless will display the descriptions of all gcc* ports. XThere are options to display the postinstall messages or Makefiles instead. X X- Martin Kammerhofer X mkamm@gmx.net END-of-portless/pkg-descr echo c - portless/files mkdir -p portless/files > /dev/null 2>&1 echo x - portless/files/portless.1 sed 's/^X//' >portless/files/portless.1 << 'END-of-portless/files/portless.1' X.\" Copyright (c) 2006 Martin Kammerhofer X.\" All rights reserved. X.\" X.\" Redistribution and use in source and binary forms, with or without X.\" modification, are permitted provided that the following conditions X.\" are met: X.\" 1. Redistributions of source code must retain the above copyright X.\" notice, this list of conditions and the following disclaimer. X.\" 2. Redistributions in binary form must reproduce the above copyright X.\" notice, this list of conditions and the following disclaimer in the X.\" documentation and/or other materials provided with the distribution. X.\" X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X.\" SUCH DAMAGE. X.\" X.\" @(#)portless.1,v 1.1 2006/06/08 10:10:56 martin Exp X.\" X.\" Note: The date here should be updated whenever a non-trivial X.\" change is made to the manual page. X.Dd June 8, 2006 X.Dt PORTLESS 1 X.Os X.Sh NAME X.Nm portless X.Nd "quickly browse port descriptions" X.Sh SYNOPSIS X.Nm X.Op Fl dfiMmp X.Op Fl P Ar pager X.Ar portglob... X.Sh DESCRIPTION X.Nm Xlets FreeBSD users quickly browse port descriptions given the port's Xname or a (shell type) glob. X.Pp XThe options are as follows: X.Bl -tag -width ".Fl P Ar pager" X.It Fl d XDisplay the X.Pa pkg-descr Xfile of the port. This is the default. X.It Fl f XTake the X.Ar portglob Xargument literal (not as a shell glob). X.It Fl i XDisplay the X.Pa distinfo Xfile of the port. X.It Fl M XDisplay the X.Pa Makefile Xfile of the port. X.It Fl m XDisplay the X.Pa pkg-message Xfile of the port. X.It Fl p XDisplay the X.Pa pkg-plist Xfile of the port. X.It Fl P Ar pager XUse the X.Ar pager Xprogram to display the files rather than the program specified by the X.Ev PAGER Xenvironment variable or the default of X.Dq Pa less -e X\&. X.El X.Sh ENVIRONMENT XThe X.Nm Xcommand uses the X.Ev PORTSDIR X(default: X.Pa /usr/ports X) and the X.Ev PAGER X(default: X.Dq Pa less -e X) environment variables. X.Sh FILES X.Bl -tag -width ".Pa /usr/ports/*/*/*" -compact X.It Pa /usr/ports/*/*/* X.El X.Sh EXAMPLES XThe following is an example of a typical usage Xof the X.Nm Xcommand: X.Pp X.Dl "portless gcc\e*" X.Sh AUTHOR XThe X.Nm Xutility and this manual page were written by X.An Martin Kammerhofer Aq mkamm@gmx.net . X.\" EOF END-of-portless/files/portless.1 echo x - portless/files/portless.sh sed 's/^X//' >portless/files/portless.sh << 'END-of-portless/files/portless.sh' X#! /bin/sh -- X# (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*- X# @(#)portless.sh,v 1.3 2006/06/08 10:10:56 martin Exp X# Show "pkg-descr" file of matching port(s). X# X# Copyright (c) 2006 Martin Kammerhofer X# All rights reserved. X# Redistribution and use in source and binary forms, with or without X# modification, are permitted provided that the following conditions X# are met: X# 1. Redistributions of source code must retain the above copyright X# notice, this list of conditions and the following disclaimer. X# 2. Redistributions in binary form must reproduce the above copyright X# notice, this list of conditions and the following disclaimer in the X# documentation and/or other materials provided with the distribution. X# X# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND X# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE X# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X# SUCH DAMAGE. X XScript=`basename $0` # name of this script X X# set defaults Xopt_f="" XPORTSDIR=${PORTSDIR:-/usr/ports} XPAGER=${PAGER=$:-less -e} XPKGDESCR="pkg-descr" X X# print usage message to stderr and exit Xusage() X{ X while [ $# != 0 ]; do X echo >&2 "$Script: $1" X shift X done X echo >&2 "usage: $Script [-dfiMmp] [-P pager] 'portglob'..." X exit 64 # EX_USAGE X} X X# process options Xwhile getopts "D:dfiMmpP:" option X do X case "$option" in X (D) PORTSDIR="$OPTARG";; X (d) PKGDESCR="pkg-descr";; X (f) opt_f="f";; X (i) PKGDESCR="distinfo";; X (M) PKGDESCR="Makefile";; X (m) PKGDESCR="pkg-message";; X (p) PKGDESCR="pkg-plist";; X (P) PAGER="$OPTARG";; X (*) usage;; X esac Xdone Xshift $(($OPTIND - 1)) X X# there must be at least one argument Xif [ $# = 0 ]; then X usage Xfi X X# main Xfor p in "$@"; do X case "$p" in X (*/*/*) X usage "portglob '$p' contains more than one slash!";; X X (*/*) X if [ -n "$opt_f" ]; then X $PAGER "$PORTSDIR/$p/$PKGDESCR" X else X $PAGER "$PORTSDIR"/$p/"$PKGDESCR" X fi;; X X (*) X if [ -n "$opt_f" ]; then X $PAGER "$PORTSDIR"/[a-z]*/"$p/$PKGDESCR" X else X $PAGER "$PORTSDIR"/[a-z]*/$p/"$PKGDESCR" X fi;; X esac Xdone X X#EOF# END-of-portless/files/portless.sh exit >Release-Note: >Audit-Trail: >Unformatted: