Changeset 19392


Ignore:
Timestamp:
05/11/09 18:42:47 (12 years ago)
Author:
ak19
Message:

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

Location:
gli/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/client-gli.sh

    r19355 r19392  
    5252
    5353##  -------- Run the Greenstone Librarian Interface --------
    54 
    55 # This script must be run from within the directory in which it lives
    56 thisdir=`pwd`
    57 if [ ! -f "${thisdir}/client-gli.sh" ]; then
    58     if [ "$glilang" = "es" ]; then
    59         echo "Este guión deberá ejecutarse desde el directorio en el que reside."
    60     elif [ "$glilang" = "fr" ]; then
    61     echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
    62     elif [ "$glilang" = "ru" ]; then
    63     echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
    64     else
    65     echo "This script must be run from the directory in which it resides."
    66     fi
    67     exit 1
    68 fi
     54# Need to run this script from its own directory instead of whichever directory it may be called from
     55#currentdir=$(cd `dirname "$0"` && pwd)
     56thisdir="`dirname \"$0\"`"
     57thisdir="`cd \"$thisdir\" && pwd`"
     58cd "$thisdir"
    6959
    7060## ---- findJava ----
  • 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.