root/main/trunk/gli/fli.sh @ 31860

Revision 21541, 1.5 KB (checked in by ak19, 10 years ago)

Minor change to the script so that fli.sh's call to gli.sh succeeds from whichever directory fli.sh was launched from.

  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3if [ "$glilang" = "es" ]; then
4  PROGNAME="Biblioteca Digital Fedora"
5elif [ "$glilang" = "fr" ]; then
6  PROGNAME="Bibliothécaire Fedora"
7elif [ "$glilang" = "ru" ]; then
8  PROGNAME="ÉÎÔÅÒÆÅÊÓ Fedora"
9else
10  PROGNAME="Fedora Librarian Interface"
11fi
12export PROGNAME
13
14PROGNAME_EN="Fedora Librarian Interface"
15export PROGNAME_EN
16
17PROGABBR="FLI"
18export PROGABBR
19
20echo
21# Test to see if FEDORA environment variables have been set up
22if [ "x$FEDORA_HOME" == "x" ]; then
23    echo "Error: Cannot run $PROGNAME_EN (PROGABBR) if FEDORA_HOME is not set."
24    exit
25fi
26
27if [ ! -d "$FEDORA_HOME" ]; then
28    echo "Error: Cannot find Fedora Home. No such directory: $FEDORA_HOME"
29    exit
30fi
31
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
41
42# Finally run GLI in fedora mode
43echo "FEDORA_HOME: $FEDORA_HOME"
44echo "FEDORA_VERSION: $FEDORA_VERSION"
45
46# Need to launch the gli.sh script from the same directory that fli was launched,
47# since that's where we are
48# substring replacement (match end part of substring): http://tldp.org/LDP/abs/html/string-manipulation.html
49gliscript=$0
50gliscript=${0/%fli.sh/gli.sh}
51#echo "script: $gliscript"
52./$gliscript -fedora -fedora_home "$FEDORA_HOME" -fedora_version "$FEDORA_VERSION" $*
Note: See TracBrowser for help on using the browser.