Changeset 20305


Ignore:
Timestamp:
2009-08-17T15:15:40+12:00 (15 years ago)
Author:
oranfry
Message:

made gs3-setup logic for ant a bit flatter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/gs3-setup.sh

    r20303 r20305  
    4848    localgs3sourcehome="`pwd`"
    4949    if [ "$GSDL3SRCHOME" == "$localgs3sourcehome" ]; then
    50     echo "Your environment is already set up for Greenstone3"
    51     return 1
     50      echo "Your environment is already set up for Greenstone3"
     51      return 1
    5252    fi
    5353    echo "Your environment was set up for Greenstone 3 in $GSDL3SRCHOME."
     
    7676  #change this if external tomcat
    7777  TOMCAT_HOME="$GSDL3SRCHOME/packages/tomcat"
    78 
    7978
    8079  ## adjustments to users (existing) environment ##
     
    124123    echo "  - Setup Greenstone ant ($GSDL3SRCHOME/packages/ant)"
    125124  else
    126       # check if ANT_HOME is already set
    127       if [ "$ANT_HOME" != "" ]; then
    128       echo "  - Falling back to using existing ANT_HOME which is set to: $ANT_HOME"
    129       echo "           Note that Greenstone requires Ant $ANT_VERSION or greater"
    130       # export ANT_HOME
    131       # Add ANT_HOME/bin to PATH if it does not already contain it
    132       ANT_BIN=$ANT_HOME/bin
    133       if [[ $PATH != *$ANT_BIN* ]]; then
    134           addtopath PATH "$ANT_BIN"
    135       fi
    136       else
    137       which ant &> /dev/null
    138       if [ "$?" == "0" ]; then
    139           echo "  - WARNING: Greenstone 'Ant' package missing - falling back to system Ant"
    140           echo "             Note that Greenstone requires Ant $ANT_VERSION or greater"
    141       else
    142           echo "  - ERROR: Greenstone 'Ant' package missing - please install Ant yourself"
    143           echo "           Note that Greenstone requires Ant $ANT_VERSION or greater"
    144       fi
    145       fi
     125    which ant &> /dev/null
     126    if [ "$?" == "0" ]; then
     127      echo "  - WARNING: Greenstone 'Ant' package missing - falling back to system Ant"
     128      echo "             Note that Greenstone requires Ant $ANT_VERSION or greater"
     129    elif [ "ANT_HOME" != "" ]; then
     130      addtopath PATH "$ANT_HOME/bin"
     131      echo "  - WARNING: Greenstone 'Ant' package missing - falling back to system Ant"
     132      echo "             Note that Greenstone requires Ant $ANT_VERSION or greater"
     133    else
     134      echo "  - ERROR: Greenstone 'Ant' package missing - please install Ant yourself"
     135      echo "           Note that Greenstone requires Ant $ANT_VERSION or greater"
     136    fi
    146137  fi
    147138
     
    162153  if test -d "$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript"; then
    163154    addtopath PATH "$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript/bin"
    164     GS_LIB="$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/lib"
    165     export GS_LIB
    166     GS_FONTPATH="$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/Resource/Font"
    167     export GS_FONTPATH
     155    GS_LIB="$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/lib"
     156    export GS_LIB
     157    GS_FONTPATH="$GSDL3SRCHOME/gs2build/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/Resource/Font"
     158    export GS_FONTPATH
    168159    echo "  - Setup GhostScript"
    169160  fi
Note: See TracChangeset for help on using the changeset viewer.