#!/bin/sh
#120225 renamed this script from basichtmlview to basichtmlviewer. added surfer.
#120512 have renamed executable in helpsurfer pkg (latest pet).

if [ -d /usr/local/PuppyBrowser ];then
 export MOZ_DISABLE_PANGO=1
 #grab these from SeaMonkey...
 [ ! -f /root/.PuppyBrowser/default/cert8.db ] && /usr/local/PuppyBrowser/find_certs &
 cd /usr/local/PuppyBrowser
 exec ./PuppyBrowser "$@" -title="Puppy HTML Viewer" -w=798 -h=580 -profile=helpviewer
fi

#120512 have renamed executable in helpsurfer pkg (latest pet)...
if [ -f /usr/bin/helpsurfer ];then #package helpsurfer
 COMMANDPARAM="`echo -n "$@" | sed -e 's%file://%%'`" #surfer cannot handle this.
 exec helpsurfer "$COMMANDPARAM"
fi

if [ -f /usr/bin/surfer ];then #package helpsurfer
 COMMANDPARAM="`echo -n "$@" | sed -e 's%file://%%'`" #surfer cannot handle this.
 exec surfer "$COMMANDPARAM"
fi

exec defaulthtmlviewer "$@"
