[15606] | 1 | @echo off
|
---|
| 2 |
|
---|
| 3 | :: by default, assume English
|
---|
| 4 | set PROGNAME=Fedora Librarian Interface
|
---|
| 5 | if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Fedora.
|
---|
| 6 | if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Fedora.
|
---|
| 7 | if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Fedora.
|
---|
| 8 | :: How to export PROGNAME?
|
---|
| 9 |
|
---|
| 10 | set PROGNAME_EN=Fedora Librarian Interface
|
---|
| 11 | set PROGABBR=FLI
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | :: Test to see if FEDORA2 environment variables have been set up
|
---|
| 15 | if "%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
|
---|
| 32 | if "%FEDORA3_HOME%" == "" echo Error: Cannot find Fedora-3 home or Fedora-2 home.
|
---|
| 33 | if "%FEDORA3_HOME%" == "" echo Have you set the environment variable 'FEDORA3_HOME' or 'FEDORA2_HOME'?
|
---|
| 34 | if "%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%
|
---|
[16402] | 42 | gli.bat -fedora -fedora_home %FEDORA3_HOME% %*
|
---|
[15606] | 43 |
|
---|
| 44 |
|
---|
| 45 | :exit
|
---|
| 46 | echo.
|
---|
| 47 | pause
|
---|
| 48 |
|
---|
| 49 | :done
|
---|
| 50 | :: ---- Clean up ----
|
---|
| 51 | set PROGNAME_EN=
|
---|
| 52 | set PROGABBR=
|
---|
| 53 | set PROGNAME= |
---|