#!/bin/sh # redirect to another port on localhost # this is meant to run as a helper application under mozilla host=127.0.0.1 port=8081 echo "unpacking :$*: on $host:$port" >/tmp/chm.log chm_http --port=$port --bind=$host "$*" >chm.log 2>&1 & HTTP=/tmp/chm2http.html echo "$*" >$HTTP echo "" >>$HTTP echo "working" >>$HTTP echo "please wait while I unpack :$*:
working...

" >>$HTTP echo "chm_http reports:
" >>$HTTP cat chm.log >>$HTTP echo "" >>$HTTP mozilla -remote "openURL($HTTP)" rm -f /tmp/chm.log /tmp/chm2http.html