$NetBSD: patch-af,v 1.1 2012/03/19 19:44:03 markd Exp $ --- khelpcenter/searchhandlers/khc_docbookdig.pl.cmake.orig 2009-09-23 19:21:09.000000000 +0000 +++ khelpcenter/searchhandlers/khc_docbookdig.pl.cmake @@ -26,8 +26,8 @@ use strict; use Getopt::Long; -my $htdigdata = "/srv/www/htdig/common/"; -my $htdigbin = "/usr/bin"; +my $htdigdata = "@CMAKE_INSTALL_PREFIX@/share/htdig/common/"; +my $htdigbin = "@CMAKE_INSTALL_PREFIX@/bin"; my $kdeprefix = "@CMAKE_INSTALL_PREFIX@"; chomp $kdeprefix; @@ -124,7 +124,10 @@ if ( !open( PARSER, ">$parserfile" ) ) { exit 1; } print PARSER << "EOT"; -#! /bin/bash +#! /bin/sh + +PATH=/bin:/usr/bin:\$PATH +export PATH file=\$1 shift @@ -132,14 +135,14 @@ mime=\$1 shift if test "\$#" -gt 0; then - orig=\${1/file:\\//} + orig=`echo \$1 | sed -e 's=file:=/='` shift fi case "\$orig" in help:/*) - orig=\${orig/help:\\//} - orig=\${orig/\/index.docbook/} + orig=\${orig#help:} + orig=\${orig\%/index.docbook} cd @HTML_INSTALL_DIR@/en/\$orig file=index.docbook ;;