Changeset 17667


Ignore:
Timestamp:
2008-11-03T19:39:27+13:00 (15 years ago)
Author:
max
Message:

Add the paths to ImageMagick and Ghostscript that are now bundled with Greenstone 2 and 3 on some platforms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/setup.bash

    r16795 r17667  
    159159  PATH=$PATH:$GSDLHOME/bin/script:$GSDLHOME/bin/$GSDLOS
    160160  export PATH
     161
     162 
     163 
     164  # Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
     165
     166if test ! -z "$MAGICK_HOME" ; then
     167
     168    echo "Your environment variable MAGICK_HOME is already set to $MAGICK_HOME"
     169    echo "Using this in preference to the version contained in Greenstone."
     170    echo "If you would like to use the version bundled with Greenstone then make sure"
     171    echo "the variable MAGICK_HOME is not set."
     172
     173else
     174
     175    if test -d $GSDLHOME/bin/$GSDLOS/imagemagick ; then
     176   
     177
     178     PATH="$GSDLHOME/bin/$GSDLOS/imagemagick/bin:$PATH"
     179     export PATH
     180 
     181     MAGICK_HOME="$GSDLHOME/bin/$GSDLOS/imagemagick"
     182     export MAGICK_HOME
     183 
     184     if test "$GSDLOS" = "linux" ; then
     185            LD_LIBRARY_PATH="$GSDLHOME/bin/$GSDLOS/imagemagick/lib:$LD_LIBRARY_PATH"
     186            export LD_LIBRARY_PATH
     187       
     188        elif test "$GSDLOS" = "darwin" ; then
     189            DYLD_LIBRARY_PATH="$GSDLHOME/bin/$GSDLOS/imagemagick/lib:$LD_LIBRARY_PATH"
     190            export DYLD_LIBRARY_PATH
     191     fi
     192    fi
     193fi
     194
     195# Note: Ghostscript is only bundled with Greenstone on Mac and Windows, not on Linux.
     196if test -d $GSDLHOME/bin/$GSDLOS/ghostscript ; then
     197  PATH="$GSDLHOME/bin/$GSDLOS/ghostscript/bin":"$PATH"
     198  export PATH
     199 
     200  GS_LIB="$GSDLHOME/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/lib"
     201  export GS_LIB
     202
     203  GS_FONTPATH="$GSDLHOME/bin/$GSDLOS/ghostscript/share/ghostscript/8.63/Resource/Font"
     204  export GS_FONTPATH
     205fi
     206 
     207 
     208 
    161209  MANPATH=$MANPATH:$GSDLHOME/packages/mg/man
    162210  export MANPATH
     
    183231unset gsdltoenc
    184232
    185 if [ -e ext ] ; then
     233if test -e ext ; then
    186234  for gsdl_ext in ext/* ; do
    187235    cd $gsdl_ext > /dev/null
    188     if [ -e setup.bash ] ; then
    189       . setup.bash
     236    if test -e setup.bash ; then
     237      . ./setup.bash
    190238    fi
    191239    cd ../.. 
     
    193241fi
    194242
    195 if [ -e local ] ; then
    196   export PATH=$GSDLHOME/local/bin:$PATH
    197   export LD_LIBRARY_PATH=$GSDLHOME/local/lib:$LD_LIBRARY_PATH
    198 fi
    199 
    200 
     243if test -e local ; then
     244  PATH=$GSDLHOME/local/bin:$PATH
     245  export PATH
     246  LD_LIBRARY_PATH=$GSDLHOME/local/lib:$LD_LIBRARY_PATH
     247  export LD_LIBRARY_PATH
     248fi
     249
     250
Note: See TracChangeset for help on using the changeset viewer.