root/gli/trunk/fli.bat @ 15606

Revision 15606, 1.9 KB (checked in by ak19, 12 years ago)

Windows script to launch FLI (the Fedora Librarian Interface)

Line 
1@echo off
2
3:: by default, assume English
4set PROGNAME=Fedora Librarian Interface
5if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Fedora.
6if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Fedora.
7if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Fedora.
8:: How to export PROGNAME?
9
10set PROGNAME_EN=Fedora Librarian Interface
11set PROGABBR=FLI
12
13
14:: Test to see if FEDORA2 environment variables have been set up
15if "%FEDORA2_HOME%" == "" goto chkFed3
16    :: Else FEDORA2_HOME exists testing if the directory FEDORA2_HOME exists
17    :: MAN: Can't use the if command to test directly for a directory, but the null (NUL) device does exist in
18    :: every directory. As a result, you can test for the null device to determine whether a directory exists.
19    if not exist %FEDORA2_HOME%\nul echo Error: Cannot find Fedora-2 home: No such directory %FEDORA2_HOME%
20    if not exist %FEDORA2_HOME%\nul goto exit
21
22        :: Otherwise FEDORA2_HOME exists and refers to a directory
23        set FEDORA_HOME=%FEDORA2_HOME%
24        :: MAN: The %* batch parameter is a wildcard reference to all the arguments, not including %0,
25        :: that are passed to the batch file.
26        gli.bat -fedora_home %FEDORA2_HOME% %*
27           
28   
29
30:: Test to see if FEDORA3 environment variables have been set up
31:chkFed3
32if "%FEDORA3_HOME%" == "" echo Error: Cannot find Fedora-3 home or Fedora-2 home. 
33if "%FEDORA3_HOME%" == "" echo Have you set the environment variable 'FEDORA3_HOME' or 'FEDORA2_HOME'?
34if "%FEDORA3_HOME%" == "" goto exit
35
36    :: Otherwise, FEDORA3_HOME has been set, check if it's a directory:
37    if not exist %FEDORA3_HOME%\nul echo Error: Cannot find Fedora-3 home: No such directory %FEDORA3_HOME%
38    if not exist %FEDORA3_HOME%\nul goto exit
39
40    :: Otherwise FEDORA2_HOME exists and refers to a directory
41    set FEDORA_HOME=%FEDORA3_HOME%
42    gli.bat -fedora_home %FEDORA3_HOME% %*
43
44
45:exit
46echo.
47pause
48
49:done
50:: ---- Clean up ----
51set PROGNAME_EN=
52set PROGABBR=
53set PROGNAME=
Note: See TracBrowser for help on using the browser.