Bug 23332 - urlview's url_handler.sh written in bash
Summary: urlview's url_handler.sh written in bash
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: David E. O'Brien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-12-06 18:50 UTC by teasmoke
Modified: 2001-08-22 18:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description teasmoke 2000-12-06 18:50:00 UTC
urlview's url_handler.sh is written in bash. FreeBSD installations which did not want to install bash will not be able to run it.

Fix: 

Generally (I don't know sh vs. bash), rewrite in sh, and patch it on installation.
How-To-Repeat: Deinstall bash if present, and execute url_handler.sh.
Comment 1 glennpj 2000-12-07 04:11:43 UTC
On Wed, Dec 06, 2000 at 10:49:42AM -0800, teasmoke@webterrier.com wrote:

> >Number:         23332
> >Category:       ports
> >Synopsis:       urlview's url_handler.sh written in bash
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-ports
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          change-request
> >Submitter-Id:   current-users
> >Arrival-Date:   Wed Dec 06 10:50:00 PST 2000
> >Closed-Date:
> >Last-Modified:
> >Originator:     Kerne Fahey
> >Release:        4.2-RELEASE
> >Organization:
> St. John's College, Annapolis, MD. (student)
> >Environment:
> FreeBSD scholar.campbell.sjca.edu 4.2-RELEASE
> FreeBSD 4.2-RELEASE #0: Tue Nov 21 19:50:52 EST 2000
> root@scholar.campbell.sjca.edu:/usr/obj/usr/src/sys/STONE i386
> >Description:
> urlview's url_handler.sh is written in bash. FreeBSD installations
> which did not want to install bash will not be able to run it.
> >How-To-Repeat:
> Deinstall bash if present, and execute url_handler.sh.
> >Fix:
> Generally (I don't know sh vs. bash), rewrite in sh, and patch it on
> installation.
> 
> >Release-Note:
> >Audit-Trail:
> >Unformatted:

Below is a patch for url_handler.sh that I have been using.  This
probably should be added to the urlview port as it is a useful
script.  Also, according to the urlview man page, url_handler.sh is
the default COMMAND that urlview uses.  The maintainer of the port is
obrien@FreeBSD.org so I would guess this PR should be directed to him.

--- url_handler.sh.orig	Wed Dec  6 21:20:40 2000
+++ url_handler.sh	Wed Dec  6 21:26:26 2000
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 
 #   Copyright (c) 1998  Martin Schulze <joey@debian.org>
 #   Slightly modified by Luis Francisco Gonzalez <luisgh@debian.org>
@@ -28,11 +28,11 @@
 # VT: Launch in the same terminal
 
 # The lists of programs to be executed are
-https_prgs="/usr/X11R6/bin/netscape:XW /usr/bin/lynx:XT"
-http_prgs="/usr/bin/lynx:XT /usr/X11R6/bin/netscape:XW"
-mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/pine:VT /usr/bin/mail:VT"
-gopher_prgs="/usr/bin/lynx:XT /usr/bin/gopher:XT"
-ftp_prgs="/usr/bin/lynx:XT /usr/bin/ncftp:XT"
+https_prgs="/usr/local/bin/netscape:XW /usr/local/bin/lynx:XT /usr/local/bin/w3m:XT"
+http_prgs="/usr/local/bin/netscape:XW /usr/local/bin/lynx:XT /usr/local/bin/w3m:XT"
+mailto_prgs="/usr/local/bin/mutt:VT /usr/local/bin/elm:VT /usr/local/bin/pine:VT /usr/bin/mail:VT"
+gopher_prgs="/usr/local/bin/lynx:XT /usr/local/bin/gopher:XT"
+ftp_prgs="/usr/local/bin/lynx:XT /usr/local/bin/ncftp:XT /usr/local/bin/ncftp2:XT /usr/local/bin/ncftp3:XT"
 
 # Program used as an xterm (if it doesn't support -T you'll need to change
 # the command line in getprg)
@@ -42,7 +42,7 @@
 ###########################################################################
 # Change bellow this at your own risk
 ###########################################################################
-function getprg()
+getprg()
 {
     local ele tag prog
 
@@ -114,7 +114,3 @@
     $prg "$url"
    fi
 fi
-
-
-
-

-- 
Glenn Johnson
glennpj@charter.net
Comment 2 Steve Price freebsd_committer freebsd_triage 2000-12-11 01:51:25 UTC
Responsible Changed
From-To: freebsd-ports->obrien

Over to port's maintainer.
Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2001-08-22 18:47:14 UTC
State Changed
From-To: open->closed

commited (and embelished)