[88823] users/ryandesign/scripts/portissues

ryandesign at macports.org ryandesign at macports.org
Thu Jan 12 17:30:57 PST 2012


Revision: 88823
          http://trac.macports.org/changeset/88823
Author:   ryandesign at macports.org
Date:     2012-01-12 17:30:56 -0800 (Thu, 12 Jan 2012)
Log Message:
-----------
portissues: new script to automate finding port issues in Trac, to satisfy this request: http://lists.macosforge.org/pipermail/macports-users/2012-January/026996.html

Added Paths:
-----------
    users/ryandesign/scripts/portissues

Added: users/ryandesign/scripts/portissues
===================================================================
--- users/ryandesign/scripts/portissues	                        (rev 0)
+++ users/ryandesign/scripts/portissues	2012-01-13 01:30:56 UTC (rev 88823)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Constructs and launches in your default web browser a URL to search
+# the MacPorts issue tracker for issues for the specified port(s),
+# and optionally any dependencies. Will only find tickets that have the
+# Port field filled out correctly.
+
+INCLUDE_DEPS=0
+if [ $# -gt 0 -a "$1" == "--deps" ]; then
+    shift
+    INCLUDE_DEPS=1
+fi
+
+if [ $# -lt 1 ]; then
+    echo "usage: $(basename "$0") [--deps] <portname> [...]" 1>&2
+    exit 1
+fi
+
+PORTS="$@"
+
+if [ $INCLUDE_DEPS -eq 1 ]; then
+    RDEPS=$(port -q rdeps $PORTS | sed /^--$/d) || exit 1
+    PORTS=$(echo $PORTS $RDEPS)
+else
+    port file $PORTS > /dev/null || exit 1
+fi
+
+URL="https://trac.macports.org/report/16?sort=ticket&asc=0&PORT=(^| |,)(${PORTS// /|})(\$| |,)"
+
+open "$URL"


Property changes on: users/ryandesign/scripts/portissues
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120112/a79e1f16/attachment.html>


More information about the macports-changes mailing list