Changeset 19392 for gli/trunk/gli.sh


Ignore:
Timestamp:
2009-05-11T18:42:47+12:00 (15 years ago)
Author:
ak19
Message:

Allowing the user to run the gli and client-gli scripts from other directories.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/gli.sh

    r19355 r19392  
    103103
    104104##  -------- Run the Greenstone Librarian Interface --------
    105 
    106 # This script must be run from within the directory in which it lives
    107 thisdir=`pwd`
    108 if [ ! -f "${thisdir}/gli.sh" ]; then
    109     if [ "$glilang" = "es" ]; then
    110         echo "Este guión deberá ejecutarse desde el directorio en el que reside."
    111     elif [ "$glilang" = "fr" ]; then
    112     echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
    113     elif [ "$glilang" = "ru" ]; then
    114     echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
    115     else
    116     echo "This script must be run from the directory in which it resides."
    117     fi
    118     exit 1
    119 fi
     105# Need to run this script from its own directory instead of whichever directory it may be called from
     106#currentdir=$(cd `dirname "$0"` && pwd)
     107thisdir="`dirname \"$0\"`"
     108thisdir="`cd \"$thisdir\" && pwd`"
     109cd "$thisdir"
    120110
    121111
Note: See TracChangeset for help on using the changeset viewer.