#!/bin/sh
exec lush "$0" "$@"
!#

;; Run the Lush documentation browser

(when (or (member "-h" argv) (member "--help" argv))
  (render-brace-text 0 72
   '{<p> 
     Synopsis: ,,(basename (car argv)) [-h] [filename]

     When invoked without argument ,,(basename (car argv))
     fires up the Lush documentation browser. The name of a
     .lsh or .hlp file can be provided, in which case
     the content of that file is displayed in the window
     instead of the full Lush manual.
     The "-h" option shows this message.{<br>}
     })
  (exit 1))

(libload "libogre/helptool")

(if (cadr argv) (helptool (cadr argv)) (helptool))

(wait *help-tool*)
