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 |
| 20 | if not exist %FEDORA_HOME%\nul echo Error: Cannot find Fedora home. No such directory: %FEDORA_HOME% |
| 21 | if not exist %FEDORA_HOME%\nul goto exit |
| 22 | |
| 23 | :: If FEDORA_VERSION not set, default fedora-version to 3 after warning user. |
| 24 | if not "%FEDORA_VERSION%" == "" goto runFed |
| 25 | echo FEDORA_VERSION (major version of Fedora) was not set. Defaulting to: 3. |
| 26 | echo If you are running a different version of Fedora, set the FEDORA_VERSION |
| 27 | echo environment variable. |
| 28 | set FEDORA_VERSION="3" |
| 29 | echo. |
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 |
| 32 | :runFed |
| 33 | :: MAN: The %* batch parameter is a wildcard reference to all the arguments, not including %0, |
| 34 | :: that are passed to the batch file. |
| 35 | echo FEDORA_HOME: %FEDORA_HOME%. |
| 36 | echo FEDORA_VERSION: %FEDORA_VERSION% |
| 37 | gli.bat -fedora -fedora_home %FEDORA_HOME% -fedora_version %FEDORA_VERSION% %* |
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 -fedora_home %FEDORA3_HOME% %* |
| 39 | :: Either (or both) of FEDORA_HOME and FEDORA_VERSION were not set, both are crucial |
| 40 | :noFed |
| 41 | echo Error: Cannot run %PROGNAME_EN% (%PROGABBR%) if FEDORA_HOME is not set. |
| 42 | goto exit |