Changeset 16466 for gli/trunk


Ignore:
Timestamp:
2008-07-18T15:33:23+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 with warning that this has been done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/fli.sh

    r16366 r16466  
    1818export PROGABBR
    1919
    20 
    21 
     20echo
    2221# Test to see if FEDORA environment variables have been set up
    23 if [ "x$FEDORA2_HOME" != "x" ]; then
    24   if [ -d "$FEDORA2_HOME" ]; then
    25     export FEDORA_HOME=$FEDORA2_HOME
    26     ./gli.sh -fedora -fedora_home "$FEDORA2_HOME" $*
    27   else
    28       echo "Error: Cannot find Fedora-2 home: Not such directory $FEDORA2_HOME"
    29       exit
    30   fi
    31 else
    32   # Test to see if FEDORA environment variables have been set up
    33   if [ "x$FEDORA3_HOME" = "x" ]; then
    34       echo "Error: Cannot find Fedora-3 home.  Have set the environment variable 'FEDORA3_HOME' ?"
    35       exit
    36   fi
    37   if [ ! -d "$FEDORA3_HOME" ]; then
    38       echo "Error: Cannot find Fedora-3 home: Not such directory $FEDORA3_HOME"
    39       exit
    40   fi
    41 
    42     export FEDORA_HOME=$FEDORA3_HOME
    43     ./gli.sh -fedora -fedora_home "$FEDORA3_HOME" $*
     22if [ "x$FEDORA_HOME" == "x" ]; then
     23    echo "Error: Cannot run $PROGNAME_EN (PROGABBR) if FEDORA_HOME is not set."
     24    exit
    4425fi
    4526
     27if [ ! -d "$FEDORA_HOME" ]; then
     28    echo "Error: Cannot find Fedora Home. No such directory: $FEDORA_HOME"
     29    exit
     30fi
    4631
     32# If FEDORA_VERSION not set, default fedora-version to 3 after warning user. 
     33if [ "x$FEDORA_VERSION" == "x" ]; then
     34    echo "FEDORA_VERSION (major version of Fedora) was not set. Defaulting to: 3."
     35    echo "If you are running a different version of Fedora, set the FEDORA_VERSION"
     36    echo "environment variable."
     37    FEDORA_VERSION="3"
     38    export FEDORA_VERSION
     39    echo
     40fi
    4741
    48 
    49 
     42# Finally run GLI in fedora mode
     43echo "FEDORA_HOME: $FEDORA_HOME"
     44echo "FEDORA_VERSION: $FEDORA_VERSION"
     45./gli.sh -fedora -fedora_home "$FEDORA_HOME" -fedora_version "$FEDORA_VERSION" $*
Note: See TracChangeset for help on using the changeset viewer.