root/main/trunk/gli/fli.bat @ 31703

Revision 25678, 1.8 KB (checked in by davidb, 8 years ago)

Added svn:executable property

  • Property svn:executable set to *
Line 
1@echo off
2
3pushd "%CD%"
4CD /D "%~dp0"
5
6:: by default, assume English
7set PROGNAME=Fedora Librarian Interface
8if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Fedora.
9if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Fedora.
10if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Fedora.
11:: How to export PROGNAME?
12
13set PROGNAME_EN=Fedora Librarian Interface
14set PROGABBR=FLI
15
16
17echo.
18:: Test to see if FEDORA_HOME environment variable has been set up
19if "%FEDORA_HOME%" == "" goto noFed
20    :: Check if the directory FEDORA_HOME exists
21    :: MAN: Can't use the if command to test directly for a directory, but the null (NUL) device does exist in
22    :: every directory. As a result, you can test for the null device to determine whether a directory exists.
23    if not exist %FEDORA_HOME%\nul echo Error: Cannot find Fedora home. No such directory: %FEDORA_HOME%
24    if not exist %FEDORA_HOME%\nul goto exit
25       
26:: If FEDORA_VERSION not set, default fedora-version to 3 after warning user.
27if not "%FEDORA_VERSION%" == "" goto runFed
28    echo FEDORA_VERSION (major version of Fedora) was not set. Defaulting to: 3.
29    echo If you are running a different version of Fedora, set the FEDORA_VERSION
30    echo environment variable.
31    set FEDORA_VERSION="3"
32    echo.
33
34
35:runFed
36:: MAN: The %* batch parameter is a wildcard reference to all the arguments, not including %0,
37:: that are passed to the batch file.
38echo FEDORA_HOME: %FEDORA_HOME%.
39echo FEDORA_VERSION: %FEDORA_VERSION%
40call gli.bat -fedora -fedora_home %FEDORA_HOME% -fedora_version %FEDORA_VERSION% %*
41goto exit
42
43:: Either (or both) of FEDORA_HOME and FEDORA_VERSION were not set, both are crucial
44:noFed
45echo Error: Cannot run %PROGNAME_EN% (%PROGABBR%) if FEDORA_HOME is not set.
46goto exit
47
48
49:exit
50echo.
51pause
52
53:done
54:: ---- Clean up ----
55set PROGNAME_EN=
56set PROGABBR=
57set PROGNAME=
58
59popd
Note: See TracBrowser for help on using the browser.