Changeset 16470 for gli


Ignore:
Timestamp:
2008-07-18T15:59:53+12:00 (16 years ago)
Author:
ak19
Message:

FEDORA_VERSION has become the secondary environment variable when running FLI. It has replaced FEDORA2_HOME/FEDORA3_HOME. When running this script, if FEDORA_HOME is set but FEDORA_VERSION isn't, then FEDORA_VERSION will default to 3 along with warning that this has been done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/fli.bat

    r16402 r16470  
    1212
    1313
    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
     14echo.
     15:: Test to see if FEDORA_HOME environment variable has been set up
     16if "%FEDORA_HOME%" == "" goto noFed
     17    :: Check if the directory FEDORA_HOME exists
    1718    :: MAN: Can't use the if command to test directly for a directory, but the null (NUL) device does exist in
    1819    :: 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.
     24if 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.
    2130
    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    
    2931
    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.
     35echo FEDORA_HOME: %FEDORA_HOME%.
     36echo FEDORA_VERSION: %FEDORA_VERSION%
     37gli.bat -fedora -fedora_home %FEDORA_HOME% -fedora_version %FEDORA_VERSION% %*
    3538
    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
     41echo Error: Cannot run %PROGNAME_EN% (%PROGABBR%) if FEDORA_HOME is not set.
     42goto exit
    4343
    4444
Note: See TracChangeset for help on using the changeset viewer.