Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (32 sloc) 1.279 kb
c6c7081 Marc Feeley Added support for viewing the Gambit manual (REPL ,h command and help pr...
authored
1 @echo off
2
3 rem Script parameters are passed in the following environment variables:
4 rem GAMBC_DOC_GAMBCDIR_BIN
5 rem GAMBC_DOC_GAMBCDIR_DOC
6 rem GAMBC_DOC_ARG1
7 rem GAMBC_DOC_ARG2
8 rem GAMBC_DOC_ARG3
9 rem GAMBC_DOC_ARG4
10 rem ...
11
12 rem echo GAMBC_DOC_GAMBCDIR_BIN = %GAMBC_DOC_GAMBCDIR_BIN%
13 rem echo GAMBC_DOC_GAMBCDIR_DOC = %GAMBC_DOC_GAMBCDIR_DOC%
14 rem echo GAMBC_DOC_ARG1 = %GAMBC_DOC_ARG1%
15 rem echo GAMBC_DOC_ARG2 = %GAMBC_DOC_ARG2%
16 rem echo GAMBC_DOC_ARG3 = %GAMBC_DOC_ARG3%
17 rem echo GAMBC_DOC_ARG3 = %GAMBC_DOC_ARG4%
18
19 if "%GAMBC_DOC_ARG1%" == "help" goto operation_help
20
21 echo *** WARNING -- unsupported operation: %GAMBC_DOC_ARG1%
22 exit 1
23
24 :operation_help
25
26 set browser_list=explorer.exe netscape.exe mozilla.exe firefox.exe lynx.exe
27
28 rem if "@HELP_BROWSER@" != "" set browser_list=@HELP_BROWSER@
29
30 set browser_list=%browser_list% %GAMBC_DOC_ARG3%
31
32 set url="file://%GAMBC_DOC_GAMBCDIR_DOC%\gambit-c.html#%GAMBC_DOC_ARG4%"
33
34 set browser=
35
36 for %%f in (%browser_list%) do if not "%%~$PATH:f" == "" set browser=%%f
37
38 if not "%browser%" == "" goto start_browser
39
40 echo *** WARNING -- none of these browsers can be found to view the documentation:
41 echo *** %browser_list%
42
43 exit 1
44
45 :start_browser
46
47 %browser% %url%
48
49 exit 0
Something went wrong with that request. Please try again.