[49039] trunk/dports/sysutils
ryandesign at macports.org
ryandesign at macports.org
Thu Apr 2 01:15:03 PDT 2009
Revision: 49039
http://trac.macports.org/changeset/49039
Author: ryandesign at macports.org
Date: 2009-04-02 01:15:03 -0700 (Thu, 02 Apr 2009)
Log Message:
-----------
openbrowser: new port
Added Paths:
-----------
trunk/dports/sysutils/openbrowser/
trunk/dports/sysutils/openbrowser/Portfile
trunk/dports/sysutils/openbrowser/files/
trunk/dports/sysutils/openbrowser/files/openbrowser
Added: trunk/dports/sysutils/openbrowser/Portfile
===================================================================
--- trunk/dports/sysutils/openbrowser/Portfile (rev 0)
+++ trunk/dports/sysutils/openbrowser/Portfile 2009-04-02 08:15:03 UTC (rev 49039)
@@ -0,0 +1,41 @@
+# $Id$
+
+PortSystem 1.0
+
+name openbrowser
+version 1.0
+categories sysutils
+platforms macosx
+maintainers ryandesign
+
+description opens files and URLs into the default web browser
+
+long_description openbrowser opens files and URLs into your default \
+ web browser. Unlike \"open\", openbrowser will still \
+ open local .html files into your web browser even \
+ if you have configured LaunchServices to open .html \
+ files into e.g. a text editor.
+
+homepage http://www.macports.org/
+
+distfiles
+
+depends_run port:p5-mac-carbon
+
+universal_variant no
+
+extract.mkdir yes
+
+configure {
+ copy ${filespath}/${name} ${worksrcpath}
+}
+
+build {
+ reinplace "s|/usr/bin/env perl|${prefix}/bin/perl|g" ${worksrcpath}/${name}
+}
+
+destroot {
+ xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
+}
+
+livecheck none
Property changes on: trunk/dports/sysutils/openbrowser/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/sysutils/openbrowser/files/openbrowser
===================================================================
--- trunk/dports/sysutils/openbrowser/files/openbrowser (rev 0)
+++ trunk/dports/sysutils/openbrowser/files/openbrowser 2009-04-02 08:15:03 UTC (rev 49039)
@@ -0,0 +1,25 @@
+#!/usr/bin/env perl -w
+# $Id$
+#
+# openbrowser by Ryan Schmidt
+# MIT license
+#
+# openbrowser opens files and URLs into your default web browser (or
+# just opens the browser, if you provide no arguments). Unlike "open",
+# openbrowser will still open local .html files into your web browser
+# even if you have configured LaunchServices to open .html files into
+# e.g. a text editor.
+#
+# usage: openbrowser [ file | url ] [ ... ]
+#
+# Thanks to John Gruber for coincidentally posting the code I'd been
+# seeking for reading the http helper from Internet Config.
+# http://daringfireball.net/2009/02/do_shell_script_premature_optimization
+
+use Mac::InternetConfig;
+
+$browser = +(GetICHelper "http")[1];
+ at open_args = ("-a", $browser);
+push @open_args, @ARGV;
+
+exec "open", @open_args;
Property changes on: trunk/dports/sysutils/openbrowser/files/openbrowser
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090402/ad095506/attachment.html>
More information about the macports-changes
mailing list