Changeset 16470
- Timestamp:
- 2008-07-18T15:59:53+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/fli.bat
r16402 r16470 12 12 13 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 14 echo. 15 :: Test to see if FEDORA_HOME environment variable has been set up 16 if "%FEDORA_HOME%" == "" goto noFed 17 :: Check if the directory FEDORA_HOME exists 17 18 :: MAN: Can't use the if command to test directly for a directory, but the null (NUL) device does exist in 18 19 :: 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 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. 21 30 22 :: Otherwise FEDORA2_HOME exists and refers to a directory23 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 31 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% %* 35 38 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 43 43 44 44
Note:
See TracChangeset
for help on using the changeset viewer.