summaryrefslogtreecommitdiffstats
path: root/khelpcenter/searchhandlers/khc_docbookdig.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'khelpcenter/searchhandlers/khc_docbookdig.pl.in')
-rwxr-xr-xkhelpcenter/searchhandlers/khc_docbookdig.pl.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/khelpcenter/searchhandlers/khc_docbookdig.pl.in b/khelpcenter/searchhandlers/khc_docbookdig.pl.in
index 63f787515..e49df688d 100755
--- a/khelpcenter/searchhandlers/khc_docbookdig.pl.in
+++ b/khelpcenter/searchhandlers/khc_docbookdig.pl.in
@@ -26,10 +26,12 @@ use strict;
use Getopt::Long;
-my $htdigdata = "/srv/www/htdig/common/";
+my $htdigdata = "/etc/htdig";
my $htdigbin = "/usr/bin";
my $kdeprefix = "@prefix@";
+my $kdehtmldir = `kde-config --expandvars --install html`;
chomp $kdeprefix;
+chomp $kdehtmldir;
my $dbg = 1;
@@ -89,7 +91,7 @@ $ENV{ PATH } = '/bin:/usr/bin';
$ENV{ CDPATH } = '';
$ENV{ ENV } = '';
-my $findpath = "$kdeprefix/share/doc/HTML/$lang/";
+my $findpath = "$kdehtmldir/$lang/";
my $findcmd = "find $findpath -name index.docbook";
print STDERR "FINDCMD: $findcmd\n";
@@ -132,15 +134,15 @@ mime=\$1
shift
if test "\$#" -gt 0; then
- orig=\${1/file:\\//}
+ orig=\${1#file:/}
shift
fi
case "\$orig" in
help:/*)
- orig=\${orig/help:\\//}
- orig=\${orig/\/index.docbook/}
- cd $kdeprefix/share/doc/HTML/en/\$orig
+ orig=\${orig#help:/}
+ orig=\${orig%\/index.docbook}
+ cd $kdehtmldir/en/\$orig
file=index.docbook
;;
*)
@@ -167,7 +169,7 @@ common_dir: $commondir
locale: $locale
database_dir: $htdigdb
database_base: \${database_dir}/$identifier
-local_urls: help://=$kdeprefix/share/doc/HTML/en/ file://=/
+local_urls: help://=$kdehtmldir/en/ file://=/
local_urls_only: true
limit_urls_to: file:// help:/
ignore_noindex: true