openbsd-ports/devel/xdg-utils/patches/patch-scripts_xdg-open
ajacoutot 7281e1c290 Fix sed(1) usage to open the proper application according to its mime
type.

breakage reported by edd@, fixed by sthen@
2013-01-04 11:42:18 +00:00

33 lines
1.2 KiB
Plaintext

$OpenBSD: patch-scripts_xdg-open,v 1.8 2013/01/04 11:42:18 ajacoutot Exp $
Fix sed(1) usage (i.e. !GNU sed).
--- scripts/xdg-open.orig Sat Jan 1 11:03:14 2011
+++ scripts/xdg-open Fri Jan 4 12:33:10 2013
@@ -384,14 +384,14 @@ open_xfce()
open_generic_xdg_mime()
{
- filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
+ filetype=`xdg-mime query filetype "$1" | sed "s/[ ;].*//"`
default=`xdg-mime query default "$filetype"`
if [ -n "$default" ] ; then
xdg_user_dir="$XDG_DATA_HOME"
[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+ [ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
local file="$x/applications/$default"
@@ -526,7 +526,7 @@ fi
if [ x"$BROWSER" = x"" ]; then
BROWSER=links2:links:lynx:w3m
if [ -n "$DISPLAY" ]; then
- BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
+ BROWSER=firefox:chrome:seamonkey:mozilla:epiphany:midori:konqueror:opera:firefox35:firefox36:${BROWSER}
fi
fi