source: trunk/gsdl/setup.bash@ 6763

Last change on this file since 6763 was 6763, checked in by mdewsnip, 20 years ago

Now with Russian strings.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1# if this file is executed, /bin/sh is used, as we don't start with #!
2# this should work under ash, bash, zsh, ksh, sh style shells.
3gsdllang=en
4
5# make sure we are sourced, and not run
6
7if test "$0" != "`echo $0 | sed s/setup\.bash//`" ; then
8# if $0 contains "setup.bash" we've been run... $0 is shellname if sourced.
9# One exception is zsh has an option to set it temporarily to the script name
10 if test -z "$ZSH_NAME" ; then
11 # we aren't using zsh
12 gsdl_not_sourced=true
13 fi
14fi
15
16if test -n "$gsdl_not_sourced" ; then
17 if [ "$gsdllang" == "es" ]; then
18 echo " Error: Asegúrese de compilar este guión, no de ejecutarlo. P. ej.:"
19 echo " $ source setup.bash"
20 echo " o"
21 echo " $ . ./setup.bash"
22 echo " no"
23 echo " $ ./setup.bash"
24 elif [ "$gsdllang" == "fr" ]; then
25 echo "-- Still coming --"
26 elif [ "$gsdllang" == "ru" ]; then
27 echo " ïÛÉÂËÁ: õÄÏÓÔÏ×ÅÒØÔÅÓØ × ÉÓÔÏÞÎÉËÅ ÜÔÏÇÏ ÓËÒÉÐÔÁ. îÅ ÉÓÐÏÌÎÑÊÔÅ ÅÇÏ."
28 echo " îÁÐÒÉÍÅÒ:"
29 echo " $ source setup.bash"
30 echo " ÉÌÉ"
31 echo " $../setup.bash"
32 echo " ÎÅÔ"
33 echo " $./setup.bash"
34 else
35 echo " Error: Make sure you source this script, not execute it. Eg:"
36 echo " $ source setup.bash"
37 echo " or"
38 echo " $ . ./setup.bash"
39 echo " not"
40 echo " $ ./setup.bash"
41 fi
42elif test -n "$GSDLHOME" ; then
43 if [ "$gsdllang" == "es" ]; then
44 echo "¡Su ambiente ya está listo para Greenstone!"
45 elif [ "$gsdllang" == "fr" ]; then
46 echo "Votre environnement est déjà préparé pour Greenstone!"
47 elif [ "$gsdllang" == "ru" ]; then
48 echo "÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÕÖÅ ÎÁÓÔÒÏÅÎÏ ÄÌÑ Greenstone!"
49 else
50 echo "Your environment is already set up for Greenstone!"
51 fi
52elif test ! -f setup.bash ; then
53 if [ "$gsdllang" == "es" ]; then
54 echo "Usted debe compilar el guión desde el interior del directorio de inicio"
55 echo "de Greenstone."
56 elif [ "$gsdllang" == "fr" ]; then
57 echo "Vous devez trouver la source du script dans le répertoire de base de Greenstone"
58 elif [ "$gsdllang" == "ru" ]; then
59 echo "÷ÁÍ ÎÅÏÂÈÏÄÉÍ ÉÓÔÏÞÎÉË ÓËÒÉÐÔÁ ÉÚ ÂÁÚÏ×ÏÊ ÄÉÒÅËÔÏÒÉÉ Greenstone"
60 else
61 echo "You must source the script from within the Greenstone home directory"
62 fi
63else
64 GSDLHOME=`pwd`
65 export GSDLHOME
66 GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
67 # check for running bash under cygwin
68 if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
69 then
70 GSDLOS=windows
71 fi
72 export GSDLOS
73
74 PATH=$PATH:$GSDLHOME/bin/script:$GSDLHOME/bin/$GSDLOS
75 export PATH
76 MANPATH=$MANPATH:$GSDLHOME/packages/mg/man
77 export MANPATH
78 if [ "$gsdllang" == "es" ]; then
79 echo "Su ambiente ha sido configurado para correr los programas Greenstone."
80 elif [ "$gsdllang" == "fr" ]; then
81 echo "Votre environnement a été configuére avec succès pour exécuter Greenstone"
82 elif [ "$gsdllang" == "ru" ]; then
83 echo "÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÂÙÌÏ ÕÓÐÅÛÎÏ ÎÁÓÔÒÏÅÎÏ, ÞÔÏÂÙ ÕÓÔÁÎÏ×ÉÔØ Greenstone"
84 else
85 echo "Your environment has successfully been set up to run Greenstone"
86 fi
87fi
88unset gsdl_not_sourced
Note: See TracBrowser for help on using the repository browser.