#!/bin/sh ## Install.sh -- Install Greenstone # set iscdrom variable to "yes" for a cdrom installation iscdrom="yes" # This string will always be in English so is not translated echo "Which version of Greenstone do you want installed: " echo "[E]nglish, (F)rench, (R)ussian or (S)panish?" printf "%s" "> " read gsdllang gsdllang=`echo $gsdllang | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # ------------------------------------------------------------------------------ # FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "x$gsdllang" = "xf" -o "x$gsdllang" = "xfrench" ]; then gsdllangcode=fr itext0="Greeenstone n'a pu �tre install�" itext1="Install.h doit �tre ex�cut� � partir du r�pertoire dans lequel il r�side." itext2="ERREUR: n'a pu trouver l'emplacement " itext3cd="Ce script va installer Greenstone sur votre syst�me. Vous pourriez parcourir le document Install.pdf pr�sent dans le repertoire des documents de ce CD ROM avant de poursuivre avec l'installation." itext3web="Ce script va installer Greenstone sur votre syst�me. Vous pourrier t�l�charger et consulter le Guide d'installeur de Greenstone (Install.pdf) avant de poursuivre l'installation." itext3="Notez que lorsque l'on vous demande de taper une r�ponse, appuyer sur \"entrer\" s�lectionnera le choix par d�faut (indiqu� entre crochets [] � la fin de chaque question). Si vous h�sitez sur l'option � choisir, choisissez l'option par d�faut. Notez aussi que Install.sh affiche des informations concernant la commande ex�cut�e sur votre syst�me sous la forme: \"--> Install.sh: [command]\". Dans cette installation, il est suppos� que vous ayez d�j� un serveur Web install� sur votre syst�me. Afin de le consulter ult�rieurement, le texte affich� lors de l'installation, celui ci est enregistr� dans un fichier appel� INSTALL_RECORD qui sera plac� dans le r�pertoire � partir duquel vous avez choisi d'installer Greenstone. Continuer? [y]" itext4=" Dans quel r�pertoire voulez-vous installer Greenstone? Assurez-vous que ce r�pertoire est sur une partition avec suffisamment d'espace disque pour les options que vous avez l'intention de choisir." itext5=" * Une installation binaire pour Linux n�cessite environ 70Mo." itext6=" * La compilation du code source de Greenstone n�cessite environ 155Mo. * L'installation facultative des collections Greenstone de d�monstration peut occuper jusqu'� 135Mo de plus (la taille de chaque collection vous sera indiqu�e avant l'installation). * La documentation en ligne n�cessite 4Mo de plus. * L'option permettant � Greenstone d'exporter des collections \"CD exporting\" n�cessite 24Mo de plus. Entrez le r�pertoire d'installation de Greenstone. Un r�pertoire gsdl sera cr�� dans ce r�pertoire." itext34=" Entrez le r�pertoire existant cgi pour les fichiers ex�cutables [/usr/local/apache/cgi-bin]" itext59=" Cette installation n�cessite l'utilitaire Gnu 'make' qui n'a pu �tre trouv� sur cet ordinateur. Veuillez entrer le chemin d'acc�s vers Gnu make" itextdoccols=" La collection Greenstone de d�monstration a �t� install�e. Souhaitez-vous installer d'autres collections � partir du CD-ROM d'installation? [y]" itextdec_dls=" Sous-ensemble de la collection Biblioth�que de D�veloppement (dls-e) - 38MB [y]" itextdec_wrdpdf=" D�monstration MSWord et PDF (wrdpdf-e) - 4MB [y]" itextdec_gsarch=" Collection des Archives de Greenstone (gsarch-e) - 9MB [y]" itextdec_cltbib=" Collection bibliographie (cltbib-e) - 9MB [y]" itextdec_cltext=" Suppl�ment bibliographie (cltext-e) - 1MB [y]" itextdec_marc=" Exemple MARC (MARC-e) - 2MB [y]" itextdec_oai=" D�mo OAI (OAI-e) - 19MB [y]" itextdec_image=" Collection d'images simple (image-e) - 1MB [y]" itextdec_authen=" D�monstration de formatage et d'authentification (authen-e) - 12MB [y]" itextdec_garish=" Version Garish de la collection de d�monstration (garish) - 12MB [y]" itextdec_isis=" Exemple CDS/ISIS (isis-e) - 2MB [y]" itextdec_dspace=" Exemple DSpace (dspace-e) - 6MB [y]" # ------------------------------------------------------------------------------ # RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "x$gsdllang" = "xr" -o "x$gsdllang" = "xrussian" ]; then gsdllangcode=ru itext0="Greenstone �� ��� ����������" itext1="Install.sh ������ ���� ���������� �� ����������, � ������� �� �����������" itext2="������: ���������� ���������� ��������������" itext3cd="���� ������ ��������� Greenstone � ���� �������. ��� ������� �� ������ ����������� �������� Install.pdf, ������� ���������� � ���������� docs �� ������ CD-ROM, �� ����������� �����������." itext3web="���� ������ ��������� Greenstone �� ��� ���������. ��� ������� ������ ��������� � ���������� ����������� �� ��������� Greenstone (Install.pdf) ����� ������������ ���������." itext3=" ��������, ��� ����� ��������� ����������� �� ����, ������� ������� \"enter\" �������� �� ��������� �������� � ���������� ������� [] � ����� ������� �������. ���� �� �� �������, ����� ������� �������, ����������� ���, ������� ��� �� ���������. �������� �����, ��� Install.sh ������ �� ������ ���������� ����� ������, ������� ��������� � ���� ������� � ����� \"--> Install.sh: [command]\". ������� ��������������, ��� ����������� ���� ��������� �����������, ���������� ���-������ � ���� �������. ��� ����������� ������ ����� ������� ���������������� ������� ����� ������� � �����, ���������� INSTALL_RECORD, � ���������, ������� �� ������� ��� ����������� Greenstone. ����������? [y]" itext4=" � ����� ���������� ������ ���� ���������� Greenstone? ��������������, ��� ��� ���������� ��������� �� ������� � ����������� ��������� ������������� �� ����� ��� �������������� ���������, ������� �� ������������� �������." itext5=" * ����������� ��������� Linux ������� �������������� 70 Mb." itext6=" * ���������� Greenstone �� �������� ��������� ������� �������������� 155 Mb. * ������������ ���������������� ��������� Greenstone ����� ������������ �� 135 Mb (��� ���������� ����� ������ ������ �������������� ��������� ����� ���, ��� �������������� ��). * ���������� ������������ ������� ���������� 4 Mb. * ������� ����������� Greenstone \"CD exporting\" ������� ��� 24 Mb. ������� ���������� ��� ����������� � ��� Greenstone. ���������� gsdl ����� ������� � ���� ����������." itext34=" ������� ������������ cgi-���������� ���������� [/usr/local/apache/cgi-bin]" itext59=" ��� ����������� ������� GNU, ������� �� ��� ��������� � ����� �������. ����������, ������� ���� ��� ���������� GNU." itextdoccols=" ���������������� ��������� Greenstone ���� �����������. ������ �� �� ���������� ����� ������ ��������� �� ��������������� CD-ROM? [y]" itextdec_dls=" ������������ ���������� �������� (dls-e) - 38MB [y]" itextdec_wrdpdf=" ������������ MSWord � PDF (wrdpdf-e) - 4MB [y]" itextdec_gsarch=" ��������� ������� Greenstone (gsarch-e) - 9MB [y]" itextdec_cltbib=" ����������������� ��������� (cltbib-e) - 9MB [y]" itextdec_cltext=" ���������� ������������ (cltext-e) - 1MB [y]" itextdec_marc=" ������ MARC (MARC-e) - 2MB [y]" itextdec_oai=" �����������-����� ��������� OAI (OAI-e) - 19MB [y]" itextdec_image=" ������� ��������� ����������� (image-e) - 1MB [y]" itextdec_authen=" ������������ �����������-��� � �������������� (authen-e) - 12MB [y]" itextdec_garish=" ������ ������ �������������-��� ��������� (garish) - 12MB [y]" itextdec_isis=" ������ CDS/ISIS (isis-e) - 2MB [y]" itextdec_dspace=" ������ DSpace (dspace-e) - 6MB [y]" # ------------------------------------------------------------------------------ # SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "x$gsdllang" = "xs" -o "x$gsdllang" = "xspanish" ]; then gsdllangcode=es itext0="Greenstone no ha sido instalado." itext1="Install.sh deber� correrse desde el directorio en el que reside." itext2="ERROR: No se pudo localizar " itext3cd="Este gui�n instalar� Greenstone en su sistema. Le recomendamos que lea el documento install.pdf que reside en el directorio de documentos de este CD-ROM antes de continuar con la instalaci�n." itext3web="Este programa va a instalar Greenstone en su sistema. Se recomienda obtener y revisar la Gu�a de Instalaci�n de Greenstone (Install.pdf) antes de continuar." itext3=" Recuerde que cuando se le pida que ingrese la informaci�n, al oprimir \"ingresar\" usted seleccionar� los ajustes por omisi�n (que aparecen entre corchetes [] al final de cada pregunta). Si no est� seguro de cu�l opci�n seleccionar utilice los ajustes por omisi�n. Recuerde asimismo que Install.sh imprime la informaci�n de cualquier comando que se ejecute en su sistema en la siguiente forma: \"--> Install.sh: [comando]\". Durante todo el proceso de instalaci�n se asume que usted ya tiene un servidor Web instalado en su sistema. Como referencia para un uso posterior los resultados de este gui�n de instalaci�n se registrar�n en un archivo llamado INSTALL_RECORD en el directorio en el que usted decidi� instalar Greenstone. �Desea continuar? [y]" itext4=" �En qu� directorio se instalar� Greenstone? Aseg�rese de que este directorio est� en una partici�n con suficiente espacio libre en el disco para las opciones que usted pretende instalar." itext5=" * La instalaci�n de un binario Linux requiere aproximadamente 70 MB." itext6=" * La compilaci�n de Greenstone desde un c�digo fuente requiere aproximadamente 155 MB. * Tambi�n pueden usarse colecciones muestra opcionales hasta un total de 135 MB (se le indicar� el tama�o de cada colecci�n individual antes de instalarla). * La documentaci�n en l�nea requiere de otros 4 MB. * La funci�n \"exportar a un CD\" de Greenstone requerir� de otros 24 MB. Ingrese el directorio para instalar Greenstone. Se crear� un directorio gsdl en este directorio." itext34=" Ingrese un directorio ejecutable cgi existente [/usr/local/apache/cgi-bin]" itext59="Esta instalaci�n requiere una utiler�a make GNU, el cual podr�a no encontrarse en su sistema. Por favor ingrese la ruta hacia la utiler�a make GNU." itextdoccols=" La colecci�n de muestra Greenstone ha sido instalada. �Le gustar�a instalar alguna otra colecci�n del CD-ROM de instalaci�n? [y]" itextdec_dls=" Subconjunto de la Biblioteca para el Desarrollo (dls-e) - 38MB [y]" itextdec_wrdpdf=" Demostraci�n en MSWord y PDF (wrdpdf-e) - 4MB [y]" itextdec_gsarch=" Colecci�n de Archivos Greenstone (gsarch-e) - 9MB [y]" itextdec_cltbib=" Colecci�n bibliogr�fica (cltbib-e) - 9MB [y]" itextdec_cltext=" Suplemento bibliogr�fico (cltext-e) - 1MB [y]" itextdec_marc=" Colecci�n de muestra MARC (MARC-e) - 2MB [y]" itextdec_oai=" Colecci�n de muestra OAI (OAI-e) - 19MB [y]" itextdec_image=" Colecci�n de im�genes sencillas (image-e) - 1MB [y]" itextdec_authen=" Demostraci�n de formateo y autenticaci�n (authen-e) - 12MB [y]" itextdec_garish=" Versi�n Garish de la colecci�n de muestra (garish) - 12MB [y]" itextdec_isis=" Colecci�n de muestra CDS/ISIS (isis-e) - 2MB [y]" itextdec_dspace=" Colecci�n de muestra DSpace (dspace-e) - 6MB [y]" # ------------------------------------------------------------------------------ # ENGLISH STRINGS # ------------------------------------------------------------------------------ else gsdllangcode=en itext0="Greenstone was not installed" itext1="Install.sh must be run from the directory in which it resides" itext2="ERROR: Could not locate " itext3cd="This script will install Greenstone on your system. You may want to skim through the Install.pdf document that resides in the docs directory on this cd-rom before continuing with the installation." itext3web="This script will install Greenstone on your system. You may want to download and skim through the Greenstone Installer's Guide (Install.pdf) before continuing with the installation" itext3=" Note that when prompted for input, hitting \"enter\" will select the default (given in square brackets [] at the end of each question). If you're unsure which option to select, use the default. Note also that Install.sh prints out information on any commands it runs on your system in the form \"--> Install.sh: [command]\". It is assumed throughout this installation procedure that you have a webserver installed on your system. For later reference the output of this install script will be recorded in a file called INSTALL_RECORD in the directory into which you choose to install Greenstone. Continue? [y]" itext4=" Which directory should Greenstone be installed to? Make sure that this directory is on a partition with sufficient free disk space for the installation options you intend selecting." itext5=" * A linux binary installation requires approximately 70Mb." itext6=" * Compiling Greenstone from source code requires approximately 155Mb. * Optional Greenstone demonstration collections may use up to a further 135Mb (you'll be told the size of each individual collection before you install it). * Online documentation requires a further 4Mb. * Enabling Greenstone's \"CD exporting\" function requires a further 24Mb. Enter directory to install Greenstone into. A gsdl directory will be created in this directory." itext34=" Enter existing cgi executable directory [/usr/local/apache/cgi-bin]" itext59=" This installation requires GNU make which could not be detected on your system. Please enter the path to gnu make" itextdoccols=" The Greenstone demonstration collection has been installed. Would you like to install any other collections from the installation cd-rom? [y]" itextdec_dls=" Development Library Subset collection (dls-e) - 38MB? [y]" itextdec_wrdpdf=" MSWord and PDF demonstration (wrdpdf-e) - 4MB? [y]" itextdec_gsarch=" Greenstone Archives collection (gsarch-e) - 9MB? [y]" itextdec_cltbib=" Bibliography collection (cltbib-e) - 9MB? [y]" itextdec_cltext=" Bibliography supplement (cltext-e) - 1MB? [y]" itextdec_marc=" MARC example (MARC-e) - 2MB? [y]" itextdec_oai=" OAI demo collection (oai-e) - 19MB? [y]" itextdec_image=" Simple image collection (image-e) - 1MB? [y]" itextdec_authen=" Formatting and authentication demo (authen-e) - 12MB? [y]" itextdec_garish=" Garish version of demo collection (garish) - 12MB? [y]" itextdec_isis=" CDS/ISIS example collection (isis-e) - 2MB? [y]" itextdec_dspace=" DSpace example collection (dspace-e) - 6MB? [y]" fi # ============================================================================== # INSTALLATION CODE # ============================================================================== cmd_cp="cp" cmd_cpr="cp -r" cmd_chmod="chmod" cmd_mkdir="mkdir -p" cmd_ln="ln -s" cmd_mv="mv" cmd_rm="rm -i" cmd_rmr="rm -r" thisdir=`pwd` cd_dir=`(cd .. && pwd)` # script must be run from within cdrom/unix directory if [ ! -f "${thisdir}/Install.sh" ]; then echo "$itext1" echo "$itext0" exit 1 fi # check that various important directories are on the cd if [ ! -d "${cd_dir}/gsdl" ]; then echo echo "${itext2}${cd_dir}/gsdl" echo "$itext0" exit 1 fi if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then echo echo "${itext2}${cd_dir}/Unix/bin/linux" echo "$itext0" exit 1 fi # install to /usr/local by default if user is "root", otherwise # default to users home directory gsdlos=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` if [ "$gsdlos" = "linux" ]; then logname=`whoami` else logname="" fi if [ "x$logname" = "x" ]; then logname=`logname` fi gsdlhome="/home/${logname}" if [ "$logname" = "root" ]; then gsdlhome="/usr/local" fi installpdf=$itext3cd if [ "$iscdrom" = "no" ]; then installpdf=$itext3web fi echo "$installpdf" echo "$itext3" printf "%s" "> " read ans log="${log}${itext3} > $ans " if [ "x$ans" != "x" -a "x$ans" != "xy" ]; then echo "$itext0" exit 0 fi # check we've got gnu make (we assume gnu make will always be used on linux) make="make" if [ "$gsdlos" != "linux" ]; then # if gmake exists, use it whichgmake=`which gmake 2> /dev/null` if [ -x "$whichgmake" ]; then make="gmake" else # try plain old "make" make_ver=`make -v 2> /dev/null | sed -n 's/^GNU.*/GNU/p'` if [ "$make_ver" != "GNU" ]; then echo "$itext59" log="${log}$itext59" printf "%s" "> " read ans make="$ans" fi fi fi # get gsdlhome msg="$itext4" if [ "$gsdlos" = "linux" ]; then msg="${msg}$itext5" fi msg="${msg}$itext6 [${gsdlhome}]" echo "$msg" printf "%s" "> " read ans log="${log}${msg} > $ans " if [ "x$ans" != "x" ]; then gsdlhome="$ans" fi # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext7=" Avertissement: Le r�pertoire ${gsdlhome} n'existe pas. Voulez-vous le cr�er? [y]" itext8="ERREUR: la cr�ation du r�pertoire $gsdlhome a �chou�" # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext7=" ��������������: ���������� ${gsdlhome} �� ����������. ������� ��? [y]" itext8="������: �� ������� ������� ���������� $gsdlhome." # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext7=" Advertencia: El directorio ${gsdlhome} no existe. �Desea crearlo? [y]" itext8="ERROR: no se pudo crear el directorio $gsdlhome." # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext7=" Warning: The ${gsdlhome} directory does not exist. Create it? [y]" itext8="ERROR: failed to create $gsdlhome directory" fi if [ ! -d "$gsdlhome" ]; then echo "$itext7" printf "%s" "> " read ans log="${log}${itext7} > $ans " if [ "x$ans" = "x" ]; then ans="y" fi if [ "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]" echo "$msg" log="${log}${msg} " $cmd_mkdir "$gsdlhome" if [ ! -d "$gsdlhome" ]; then echo "$itext8" echo "$itext0" exit 1 fi else echo "$itext0" exit 0 fi fi # from now on $gsdlhome includes the "/gsdl" gsdlhome="${gsdlhome}/gsdl" # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext9=" Si cette installation �choue ou est annul�e, n'oubliez pas d'ex�cuter le script uninstall (${gsdlhome}/Uninstall.sh) pour nettoyer l'installation partielle. Continuer? [y]" itext10=" Installation de la hi�rarchie des r�pertoires � partir de ${gsdlhome}" itext11=" Souhaitez-vous installer la documentation Greenstone sur votre disque dur? La documentation occupe environ 4Mo d'espace disque. Si vous n'installez pas la documentation, vous pourrez toujours la consulter � partir du r�pertoire 'docs' du CD-ROM [y]" itext12=" Souhaitez-vous installer la fonctionnalit� Greenstone pour exporter? Cette fonctionnalit� vous permet d'exporter une collection Greenstone dans un format adapt� pour graver un CD-ROM auto-installable sous Windows. Ce module occupe environ 23Mo d'espace disque [n]" itext18="Initialisation des permissions ..." itext19=" Afin de permettre la construction de collection par les utilisateurs finaux, le programme cgi Greenstone doit pouvoir �crire dans les r�pertoires ${gsdlhome}/collect et ${gsdlhome}/tmp r�pertoires. Sur la plupart des syst�mes, cela veut dire que ces r�pertoires doivent permettre l'�criture. Permettre l'�criture dans ces r�pertoires? [y]" itext20=" Vous pouvez soit installer les fichiers [b]inaires ex�cutables sous Linux (i386 seulement), soit installer et [c]ompiler le code source de Greenstone." itext21="Entrez \"[b]\" ou \"c\"" itext22="Installation des fichiers binaires ex�cutables sous Linux" itext23="Installation du code source" itext24="configuration ..." itext25="compilation ..." itext26="installation ..." itext27="ERREUR: La compilation a �chou�" itext28=" Greenstone a besoin d'un r�pertoire cgi (pour les ex�cutables) valide (normalement appel� cgi-bin sur les syst�mes Unix) pour ex�cuter. Ce peut �tre soit: 1. Le r�pertoire cgi-bin Greenstone par d�faut (${gsdlhome}/cgi-bin). Dans ce cas vous devrez configurer votre serveur Web pour consid�rer ce r�pertoire comme �tant son r�pertoire cgi pour les fichiers ex�cutables. Pour Apache, vous pouvez utiliser la directive 'ScriptAlias' (les d�tails concernant la configuration de votre serveur Web seront affich�s � la fin de cette proc�dure d'installation)." itext29=" Veuillez noter que vous aurez certainement besoin de l'aide de votre administrateur syst�me pour reconfigurer votre serveur Web." itext30=" 2. Un r�pertoire cgi-bin existant. Normallement un r�pertoire cgi-bin est cr�� au moment de l'installation de votre serveur web. G�n�ralement c'est soit /home/httpd/cgi-bin, soit /usr/local/apache/cgi-bin, soit /var/lib/apache/cgi-bin." itext31=" De nombreux syst�mes permettent aux utilisateurs individuels d'avoir leur propre r�pertoire cgi-bin in /home/username/public_html/cgi-bin." itext32="Entrez \"[1]\" or \"2\"" itext33=" N'oubliez pas de configurer votre serveur Web pour consid�rer ${gsdlhome}/cgi-bin comme le r�pertoire cgi ex�cutable. Ne vous en faites pas, vous serez � nouveau pr�venu � la fin de cette proc�dure d'installation." itext37="Ex�cutez le script uninstall (${gsdlhome}/Uninstall.sh) pour nettoyer une installation partielle." itext42=" Pour pouvoir ex�cuter Greenstone, le r�pertoire $gsdlhome et tout son contenu doit �tre accessible � partir du Web. Pour que cela soit possible, vous pouvez soit: 1. Configurer le serveur Web pour que le r�pertoire $gsdlhome soit lui-m�me accessible � partir du Web." itext43=" 2. Indiquer un r�pertoire Web d�j� accessible � partir du Web dans lequel un lien symbolique (ln -s) vers $gsdlhome sera cr��. Lorsqu'un serveur Web est install�, un r�pertoire accessible � partir du web est toujours cr�� (le serveur Web Apache utilise la directive DocumentRoot pour d�finir ce r�pertoire). En g�n�ral, ce r�pertoire est appel� /home/httpd/html, ou bien /usr/local/apache/htdocs, ou encore /var/lib/apache/htdocs." itext44=" De nombreux syst�mes permettent aux utilisateurs individuels d'avoir leur propre r�pertoire accessible � partir du Web. Ces r�pertoires sont cr��s � partir du r�pertoire /home/username/public_html." itext45=" Veuillez noter que le serveur Web devra �tre configur� pour accepter les liens symboliques � partir de ce r�pertoire. Pour le serveur Apache cela signifie que ce r�pertoire doit �tre configur� avec les options SymLinksIfOwnerMatch et FollowSymLinks (La plupart des installations Apache sont configur�es de cette fa�on par d�faut)" itext46=" N'oubliez pas de configurer le serveur Web pour que le r�pertoire $gsdlhome soit accessible � partir du Web. On vous le rappellera encore une fois � la fin la fin de la proc�dure d'installation." # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext9=" ���� ��� ����������� ���� ��������� ��� ��������, ������� ����������������� ������ (${gsdlhome}/Uninstall.sh), ����� �������� ��������� ���������. ����������? [y]" itext10=" ����������� ��������� ���������� Greenstone � ${gsdlhome}" itext11=" ������ �� �� ���������� ������������ Greenstone �� ��� ������� ����? ������������ ������� �������������� 4 Mb ������������. ���� �� �� ������ ������������� ��, � ��� �������� ����������� �������� ������ � ��� �� ���������� ���������� CD-ROM) [y]" itext12=" ������ �� �� ���������� ��������� ������� Greenstone \"������� �������-�����\"? ��� ������� ��������� ��� �������������� ��������� Greenstone � �����, ���������� ��� ������������� Windows CD-ROM. ���� ����� ������� �������������� 23 �� ��������� ������������ [n]" itext18="��������� ����������..." itext19=" ��� ���������� ���������, ��������� ��� ��������� ������������, cgi ��������� Greenstone ������ ����� ����������� ��������� � ���������� ${gsdlhome}/collect � ${gsdlhome}/tmp. ��� ����������� ������ ��� ��������, ��� ��� ������ ���� ��������� ���������������. ������� ��� ���������� ��������� �����������������? [y]" itext20=" �� ������ ��� ���������� �����������������, ���������� ��������� [b] �������� ���� linux (������ i386) ��� ���������� � [c] ������������� �������� ��������� Greenstone" itext21="������� \"[b]\" ��� \"c\"" itext22="����������� �������� ����� linux" itext23="����������� �������� ���������" itext24="����������������..." itext25="��������������..." itext26="����������..." itext27="������: ���������� �� �������" itext28=" Greenstone ����� ��������� �������������� ���������� (� unix �������� ������ ���������� cgi-bin), �� ������� �� �����������. ��� ����� ���� ����: 1. ��������� �� ��������� ���������� Greenstone cgi-bin (${gsdlhome}/cgi-bin). ���� �� ����������� �� ��������� Greenstone, ��� ���������� ��������������� ��� ���-������ ���, ����� ������� ��� ���������� ��� cgi ����������. ��� ���-������� Apache �� ����������� ��������� ScriptAlias, ����� ��������� ��� (����������� � ���, ��� ��������������� ��� ���-������, ����� ���� � ����� ���� ��������� �����������)." itext29=" �������� ��������, ��� �� ������ �������� ��������� � ������ ������ ���������� ��������������, ����� ����������������� ��� ���-������" itext30=" 2. ������������ ���������� cgi-bin. ������ ��� ���������� ��������� ��� ����������� ������ ���-�������. ��� �������, ��� ����� ���� /home/httpd/cgi-bin, ��� /usr/local/apache/cgi-bin, ��� /var/lib/apache/cgi-bin." itext31=" ������ ������� ����� ��������� �������������� ������������� ����� �� ����������� cgi-bin � /home/username/public_html/cgi-bin." itext32="������� \"[1]\" ��� \"2\"" itext33=" �� �������� ���������������� ��� ���-������ ���, ����� �������� ${gsdlhome}/cgi-bin � cgi-���������� ����������. �� ����������, ����� ��� ����� ��������� �� ���� ����� � ����� ��������� �����������." itext37="����������� ����������������� ������ (${gsdlhome}/Uninstall.sh) ��� ����, ����� ������� ��������� ���������." itext42=" ����� Greenstone ��� ���� �������, ���������� $gsdlhome � ��� �� ���������� ������ ���� �������� �� ����. ����� ������� ��� ������������, �� ������ ���: 1. ���������������� ��� ���-������ ���, ����� $gsdlhome ������� ������������� ��������� �� ����." itext43=" 2.���������� ������������ ��������� ����������, �� ������� ���������� ������ (ln -s) ����� ������� � $gsdlhome. ����� ��� ������ ��� ����������, ����������, ��������� �� ����, ����� ������� (���-������ Apache ���������� ��������� DocumentRoot ��� ����������� ���� ����������. ������ ���� ����������� ����� �� ���� /home/httpd/html, ��� /usr/local/apache/htdocs, ��� /var/lib/apache/htdocs." itext44=" ������ ������ ����� ��������� �������������� ������������� ����� �� ����������� ��������� �� ���� ���������� � /home/username/public_html." itext45=" �������� �������� �� ��, ��� ��� ���-������ ����� ������ ��������������� ���, ����� ��������� ���������� ������ ������� ���� ����������. ��� ������� Apache ��� ��������, ��� ������ ���������� ������ ������������� � ������� SymLinksIfOwnerMatch ��� �������� FollowSymLinks (����������� ����������� Apache ��������� ���� ���� �� ���������)." itext46=" �� �������� ��������������� ��� ���-������ ���, ����� ����������� ��� webserver, ����� $gsdlhome ��� �������� �� ����. ��� ����� ��������� �� ���� ����� � ����� ������ ��������������� ���������." # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext9=" Si no se puede realizar la instalaci�n o �sta se cancela, corra el gui�n de desinstalaci�n (${gsdlhome}/Uninstall.sh) para eliminar las partes instaladas. �Desea continuar? [y]" itext10=" Instalaci�n de la estructura de directorios Greenstone en ${gsdlhome}" itext11=" �Le gustar�a instalar la documentaci�n de Greenstone en su disco duro? Los documentos ocupar�n aproximadamente 4 MB de espacio. Si decide no instalarlos a�n podr� tener acceso a ellos desde el directorio de docs del CD-ROM) [y]" itext12=" �Le gustar�a instalar el soporte para la funci�n \"exportar a CD\" de Greenstone? Esta funci�n le permite exportar una colecci�n Greenstone en una forma que permita escribir en ella a un CD-ROM para Windows que se podr� instalar autom�ticamente. Este paquete utilizar� aproximadamente 23 MB de espacio en el disco duro [n]" itext18="Estableciendo los permisos..." itext19=" Con el fin de que el usuario final pueda crear y construir una colecci�n, el programa cgi de Greenstone deber� ser capaz de escribir en los directorios ${gsdlhome}/collect y ${gsdlhome}/tmp. En la mayor�a de los sistemas esto significa que deber� poderse escribir en ellos globalmente. �Desea que se pueda escribir en estos directorios globalmente? [y]" itext20=" Usted puede instalar los [b]inarios de Linux vinculados est�ticamente que se han compilado previamente (�nicamente i386) o instalar y [c]ompilar el c�digo fuente de Greenstone." itext21="Escriba \"[b]\" o \"c\"" itext22="Instalaci�n de los binarios de Linux" itext23="Instalaci�n del c�digo fuente" itext24="configurando..." itext25="compilando..." itext26="instalando..." itext27="ERROR: No se pudo compilar." itext28=" Greenstone necesita un directorio ejecutable cgi que sea v�lido (normalmente llamado cgi-bin en los sistemas UNIX) desde el cual se pueda correr. Este puede ser: 1. El directorio cgi-bin por omisi�n de Greenstone (${gsdlhome}/cgi-bin). Si usted utiliza esta opci�n entonces necesitar� configurar su servidor Web para que trate a este directorio como un directorio ejecutable cgi. En el caso del servidor Web Apache se utiliza la directiva ScriptAlias para poder hacer esto (los detalles de la forma de configurar su servidor Web aparecer�n al final de este proceso de instalaci�n)." itext29=" Recuerde que probablemente necesitar� ayuda de su administrador de sistemas para reconfigurar su servidor Web." itext30=" 2. Un directorio cgi-bin existente. Normalmente se crea un directorio cgi-bin al momento de instalar su servidor Web. En t�rminos generales este puede ser /home/httpd/cgi-bin, /usr/local/apache/cgi-bin o /var/lib/apache/cgi-bin." itext31=" Muchos sistemas tambi�n le permiten a sus usuarios tener sus propios directorios individuales cgi-bin en /home/username/public_html/cgi-bin." itext32="Escriba \"[1]\" o \"2\"" itext33=" No olvide configurar su servidor Web para que trate a ${gsdlhome}/cgi-bin como un directorio ejecutable cgi. No se preocupe, esto se le recordar� nuevamente al final del proceso de instalaci�n." itext37="Corra el gui�n de desinstalaci�n (${gsdlhome}/Uninstall.sh) para eliminar las partes instaladas." itext42=" Para que Greenstone pueda funcionar, el directorio $gsdlhome y todos sus contenidos deber�n ser accesibles desde la Web. Para lograr esto usted puede: 1. Configurar su servidor Web de tal manera que el mismo $gsdlhome sea accesible desde la Web." itext43=" 2. Proporcionar un directorio existente que sea accesible desde la Web, a trav�s del cual se crear� un v�nculo simb�lico (ln -s) con $gsdlhome. Cuando instal� su servidor seguramente se cre� un directorio accesible desde la Web (el servidor Apache utiliza la directiva DocumentRoot para definir este directorio). En t�rminos generales este directorio podr� ser /home/httpd/html, /usr/local/apache/htdocs o /var/lib/apache/htdocs." itext44=" Muchos sistemas tambi�n le permiten a los usuarios tener sus propios directorios individuales accesibles desde la Web en /home/username/public_html." itext45=" Recuerde que necesitar� configurar su servidor Web para permitir la creaci�n de v�nculos simb�licos desde el interior de este directorio. En el caso del servidor Apache esto significa que dicho directorio deber� configurarse con la opci�n SymLinksIfOwnerMatch o FollowSymLinks (la mayor�a de las instalaciones Apache se configuran de esta manera por omisi�n)." itext46=" No olvide configurar su servidor Web para hacer que $gsdlhome sea accesible desde la Web. Se le recordar� esto nuevamente al final del proceso de instalaci�n." # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext9=" If this installation fails or is cancelled, run the uninstall script (${gsdlhome}/Uninstall.sh) to clean up the partial installation. Continue? [y]" itext10=" Installing Greenstone directory structure to ${gsdlhome}" itext11=" Would you like to install the Greenstone documentation to your hard drive? The docs will use about 4Mb of space. If you choose not to install them you can still access them from within the docs directory of the cd-rom) [y]" itext12=" Would you like to install support for Greenstone's \"CD exporting\" function? This function allows you to export a Greenstone collection in a form suitable for writing to a self-installing Windows cd-rom. This package will use approximately 23Mb of disk space [n]" itext18="Setting permissions ..." itext19=" In order for end-user collection building to be enabled the Greenstone cgi program must be able to write to the ${gsdlhome}/collect and ${gsdlhome}/tmp directories. On most systems this means they must be globally writable. Make these directories globally writable? [y]" itext20=" You may either install pre-compiled, statically linked linux [b]inaries (i386 only) or install and [c]ompile the Greenstone source code" itext21="Enter \"[b]\" or \"c\"" itext22="Installing linux binaries" itext23="Installing source code" itext24="configuring ..." itext25="compiling ..." itext26="installing ..." itext27="ERROR: Compilation failed" itext28=" Greenstone needs a valid cgi executable directory (normally called cgi-bin on unix systems) from which to run. This may be either: 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin). If you use the Greenstone default you will need to configure your webserver to treat this directory as a cgi executable directory. For the Apache webserver you use the ScriptAlias directive to do this (details of how to configure your webserver will be displayed at the end of this installation procedure)." itext29=" Note that you will probably need help from your system administrator to reconfigure your webserver." itext30=" 2. An existing cgi-bin directory. Normally a cgi-bin directory is created when your webserver is installed. Typically, this might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or /var/lib/apache/cgi-bin." itext31=" Many systems also allow individual users to have their own cgi-bin in /home/username/public_html/cgi-bin." itext32="Enter \"[1]\" or \"2\"" itext33=" Don't forget to configure your webserver to treat ${gsdlhome}/cgi-bin as a cgi executable directory. Don't worry, you'll be reminded of this again at the end of the installation procedure" itext37="Run the uninstall script (${gsdlhome}/Uninstall.sh) to clean up the partial installation." itext42=" In order for Greenstone to run, the $gsdlhome directory and all it contains must be accessible from the web. To make this happen you may either: 1. Configure your webserver so that $gsdlhome is itself accessible from the web." itext43=" 2. Provide an existing web accessible directory from which a symbolic link (ln -s) will be made to $gsdlhome. When your server was installed a web accessible directory will have been created (the Apache webserver uses the DocumentRoot directive to define this directory). Typically this directory might be /home/httpd/html, or /usr/local/apache/htdocs, or /var/lib/apache/htdocs." itext44=" Many systems also allow individual users to have their own web accessible directory in /home/username/public_html." itext45=" Note that your web server will need to be configured to allow symbolic links from within this directory. For the Apache server that means this directory must be configured with the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache installations are configured this way by default)." itext46=" Don't forget to configure your webserver to make $gsdlhome accessible from the web. You'll be reminded of this again at the end of this installation procedure." fi msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]" echo "$msg" log="${log}${msg} " $cmd_mkdir "$gsdlhome" if [ ! -d "$gsdlhome" ]; then echo "$itext8" echo "$itext0" exit 1 fi # set permissions on gsdlhome directory msg="--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]" echo "$msg" log="${log}${msg} " $cmd_chmod u+rwx "$gsdlhome" # create initial Uninstall.sh cd "$gsdlhome" echo "#!/bin/sh" > Uninstall.sh echo "" >> Uninstall.sh echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh echo "read ans" >> Uninstall.sh echo "if [ \"x\$ans\" = \"x\" -o \"x\$ans\" = \"xy\" ]; then" >> Uninstall.sh echo " $cmd_chmod -R u+rwx \"$gsdlhome\"" >> Uninstall.sh echo " exec $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh echo "fi" >> Uninstall.sh $cmd_chmod u+x Uninstall.sh cd "$thisdir" # create initial INSTALL_RECORD echo "$log" >> "${gsdlhome}/INSTALL_RECORD" echo "$itext9" echo "$itext9" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" != "x" -a "x$ans" != "xy" ]; then msg="$itext0" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" exit 0 fi echo "$itext10" echo "$itext10" >> "${gsdlhome}/INSTALL_RECORD" # copy gsdl directory across msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome" # copy setup shell scripts across too msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome" # make sure we have a tmp directory if [ ! -d "$gsdlhome/tmp" ]; then msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mkdir "${gsdlhome}/tmp" fi # make collect directory writable so we can install collections msg="--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod u+rwx "$gsdlhome/collect" if [ "$iscdrom" = "yes" ]; then # do we want docs directory? echo "$itext11" echo "$itext11" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then docs="yes" docs_dir="${cd_dir}/docs" if [ "$gsdllangcode" = "fr" ]; then docs_dir="${docs_dir}/french" elif [ "$gsdllangcode" = "ru" ]; then docs_dir="${docs_dir}/russian" elif [ "$gsdllangcode" = "es" ]; then docs_dir="${docs_dir}/spanish" else docs_dir="${docs_dir}/english" fi msg="--> Install.sh: [$cmd_cpr \"${docs_dir}\" \"$gsdlhome/docs\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${docs_dir}" "$gsdlhome/docs" fi # do we want the "CD exporting" stuff? echo "$itext12" echo "$itext12" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "xY" -o "x$ans" = "xy" ]; then export="yes" msg="--> Install.sh: [$cmd_chmod u+rw \"${gsdlhome}/bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod u+rw "${gsdlhome}/bin" msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mkdir "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/netscape\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/Windows/bin/windows/netscape" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/Win32s\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/Windows/bin/windows/Win32s" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net16\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/Windows/bin/windows/net16" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net32\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/Windows/bin/windows/net32" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/server.exe\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/Windows/bin/windows/server.exe" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/gssetup.exe\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/Windows/bin/windows/gssetup.exe" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/setpw.exe\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/Windows/bin/windows/setpw.exe" "${gsdlhome}/bin/windows" msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/Setup.exe\" \"${gsdlhome}/bin/windows\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/Windows/bin/windows/Setup.exe" "${gsdlhome}/bin/windows" fi # which collections do we want cd "${cd_dir}/collect" echo "$itextdoccols" echo "$itextdoccols" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then # Documented example collections have a customised home.dm $cmd_cp "${cd_dir}/collect/home.dm" "${gsdlhome}/macros" # dls-e echo "$itextdec_dls" echo "$itextdec_dls" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/dls-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/dls-e" "${gsdlhome}/collect" fi # wrdpdf-e echo "$itextdec_wrdpdf" echo "$itextdec_wrdpdf" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wrdpdf-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/wrdpdf-e" "${gsdlhome}/collect" fi # gsarch-e echo "$itextdec_gsarch" echo "$itextdec_gsarch" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/gsarch-e" "${gsdlhome}/collect" fi # cltbib-e echo "$itextdec_cltbib" echo "$itextdec_cltbib" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/cltbib-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/cltbib-e" "${gsdlhome}/collect" fi # cltext-e echo "$itextdec_cltext" echo "$itextdec_cltext" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/cltext-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/cltext-e" "${gsdlhome}/collect" fi # MARC-e echo "$itextdec_marc" echo "$itextdec_marc" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/MARC-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/MARC-e" "${gsdlhome}/collect" fi # oai-e echo "$itextdec_oai" echo "$itextdec_oai" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/oai-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/oai-e" "${gsdlhome}/collect" fi # image-e echo "$itextdec_image" echo "$itextdec_image" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/image-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/image-e" "${gsdlhome}/collect" fi # authen-e echo "$itextdec_authen" echo "$itextdec_authen" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/authen-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/authen-e" "${gsdlhome}/collect" fi # garish-e echo "$itextdec_garish" echo "$itextdec_garish" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/garish\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/garish" "${gsdlhome}/collect" fi # isis-e echo "$itextdec_isis" echo "$itextdec_isis" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/isis-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/isis-e" "${gsdlhome}/collect" fi # dspace-e echo "$itextdec_dspace" echo "$itextdec_dspace" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/dspace-e\" \"${gsdlhome}/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/collect/dspace-e" "${gsdlhome}/collect" fi fi fi # set permissions msg=" $itext18 --> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"] --> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/script/\"*]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod -R u+rw "$gsdlhome" $cmd_chmod a+x "${gsdlhome}/bin/script/"* # certain files in gsdl/etc need to be globally writable msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/error.txt\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/error.txt" msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/key.db\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/key.db" msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/users.db\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/users.db" msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/main.cfg\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/main.cfg" msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/history.db\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/history.db" msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/usage.txt\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+w "$gsdlhome/etc/usage.txt" # should gsdl/collect and gsdl/tmp be globally writable? echo "$itext19" echo "$itext19" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod -R a+w "$gsdlhome/collect" msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod -R a+w "$gsdlhome/tmp" fi # binaries or source code? compile="yes" if [ "$gsdlos" = "linux" ]; then echo "$itext20" echo "$itext20" >> "${gsdlhome}/INSTALL_RECORD" found=no while [ "$found" = "no" ]; do echo "$itext21" echo "$itext21" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xb" ]; then compile="no" # install binaries msg=" $itext22 --> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin" msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+x "${gsdlhome}/bin/linux/"* msg="--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod -R u+rw "${gsdlhome}/bin/linux" # move library executable to cgi-bin msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin" # move oaiserver executable to cgi-bin msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/oaiserver\" \"${gsdlhome}/cgi-bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mv "${gsdlhome}/bin/linux/oaiserver" "${gsdlhome}/cgi-bin" found="yes" elif [ "x$ans" = "xc" ]; then found="yes" fi done fi if [ "$compile" = "yes" ]; then # install source msg=" $itext23 --> Install.sh: [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/src/src" "$gsdlhome" msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome" msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Install.txt\" \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_cp "${cd_dir}/src/Install.txt" "$gsdlhome" msg="--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod -R u+rw "$gsdlhome" msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_chmod a+x "${gsdlhome}/configure" # compile it msg="--> Install.sh: [cd $gsdlhome]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" cd "$gsdlhome" msg="$itext24 --> Install.sh: [./configure]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" ./configure msg="$itext25 --> Install.sh: [make]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $make msg="$itext26 --> Install.sh: [make install]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $make install msg="--> Install.sh: [cd $thisdir]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" cd "$thisdir" # check that things compiled ok if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then msg="$itext27 $itext0 $itext37" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" exit 1 fi fi # try to find out hostname if [ "$gsdlos" = "linux" ]; then gsdlhost=`hostname -f` if [ "x$gsdlhost" = "x" ]; then gsdlhost=`hostname -i` fi fi if [ "x$gsdlhost" = "x" ]; then gsdlhost=`hostname` fi if [ "x$gsdlhost" = "x" ]; then gsdlhost="your-computer-name" fi # get cgi-bin directory echo "$itext28" echo "$itext28" >> "${gsdlhome}/INSTALL_RECORD" if [ "$logname" != "root" ]; then echo "$itext29" echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD" fi echo "$itext30" echo "$itext30" >> "${gsdlhome}/INSTALL_RECORD" if [ "$logname" != "root" ]; then echo "$itext31" echo "$itext31" >> "${gsdlhome}/INSTALL_RECORD" fi found=no remind_cgi="no" remind_cgi_nomove="no" while [ "$found" = "no" ]; do echo "$itext32" echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "x1" ]; then found="option1" cgi_bin="${gsdlhome}/cgi-bin" # default gsdl cgi-bin, do nothing echo "$itext33" echo "$itext33" >> "${gsdlhome}/INSTALL_RECORD" remind_cgi="yes" elif [ "x$ans" = "x2" ]; then found="option2" # external cgi-bin echo "$itext34" echo "$itext34" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" ]; then cgi_bin="/usr/local/apache/cgi-bin" else cgi_bin="$ans" fi # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext35="Avertissement: Le r�pertoire ${cgi_bin} n'existe pas. Voulez-vous le cr�er? [y]" itext36="N'oubliez pas de configurer votre serveur Web pour consid�rer ${gsdlhome}/cgi-bin comme le r�pertoire cgi ex�cutable. Ne vous en faites pas, on vous le rappellera encore une fois � la fin la fin de la proc�dure d'installation." itext38="ERREUR: la cr�ation du r�pertoire $cgi_bin a �chou�" itext39=" Impossible d'�crire dans le r�pertoire $cgi_bin . Vous devrez copier le contenu du r�pertoire ${gsdlhome}/cgi-bin dans le r�pertoire $cgi_bin une fois cette installation termin�e. On vous le rappellera encore une fois � la fin la fin de la proc�dure d'installation." itext40=" Installation des programmes cgi Greenstone dans $cgi_bin" # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext35="��������������: ${cgi_bin} ���������� �� ����������. ������� ��? [y]" itext36="�� �������� ���������������� ��� ���-������ ����� �������, ����� ������� $cgi_bin � �������� cgi ���������� ����������. �� ����������, ���� � ����� ����������� ��� ����� ��������� �� ���� �����." itext38="������: �� ������� ������� ���������� $cgi_bin" itext39=" ���������� ������ � ���������� $cgi_bin. ��� ���������� ����������� ���������� ${gsdlhome}/cgi-bin � $cgi_bin ����� ���� ����������� ����� ���������. ��� ����� ��������� �� ���� ����� � ����� �������������� ���������." itext40=" ����������� cgi-��������� Greenstone � $cgi_bin" # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext35="Advertencia: El directorio ${cgi_bin} no existe. �Desea crearlo? [y]" itext36="No olvide configurar su servidor Web para que trate a $cgi_bin como un directorio ejecutable cgi. No se preocupe, esto se le recordar� nuevamente al final del proceso de instalaci�n." itext38="ERROR: El directorio $cgi_bin no se pudo crear." itext39=" No se puede escribir en el directorio $cgi_bin. Usted necesitar� copiar los contenidos de ${gsdlhome}/cgi-bin en $cgi_bin despu�s de que la instalaci�n est� completa. Se le recordar� esto nuevamente al final del proceso de instalaci�n." itext40=" Instalaci�n de los programas cgi de Greenstone en $cgi_bin" # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext35="Warning: The ${cgi_bin} directory does not exist. Create it? [y]" itext36="Don't forget to configure your webserver to treat $cgi_bin as a cgi executable directory. Don't worry, you'll be reminded of this again at the end of the installation procedure" itext38="ERROR: failed to create $cgi_bin directory" itext39=" Unable to write to $cgi_bin directory. You will need to copy the contents of ${gsdlhome}/cgi-bin to $cgi_bin after this installation is completed. You'll be reminded of this again at the end of the installation procedure." itext40=" Installing Greenstone cgi programs in $cgi_bin" fi if [ ! -d "$cgi_bin" ]; then echo "$itext35" echo "$itext35" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "xy" ]; then msg="--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mkdir "$cgi_bin" if [ -d "$cgi_bin" ]; then echo "$itext36" echo "$itext36" >> "${gsdlhome}/INSTALL_RECORD" remind_cgi="yes" else msg="$itext38 $itext0 $itext37" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" exit 1 fi fi fi if [ ! -w "$cgi_bin" ]; then echo "$itext39" echo "$itext39" >> "${gsdlhome}/INSTALL_RECORD" remind_cgi_nomove="yes" else # install cgi-bin stuff (update the uninstall script first) cd "$gsdlhome" echo "#!/bin/sh" > Uninstall.sh echo "" >> Uninstall.sh echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh echo "read ans" >> Uninstall.sh echo "if [ \"x\$ans\" = \"x\" -o \"\x$ans\" = \"xy\" ]; then" >> Uninstall.sh echo " exec $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh echo "fi" >> Uninstall.sh $cmd_chmod u+x Uninstall.sh cd "$thisdir" msg="$itext40 --> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin" msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin" msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/oaiserver\" \"$cgi_bin\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_mv "${gsdlhome}/cgi-bin/oaiserver" "$cgi_bin" fi fi done # web address of cgi-bin web_cgi="http://${gsdlhost}/cgi-bin" if [ "$found" = "option1" ]; then web_cgi="http://${gsdlhost}/gsdl/cgi-bin" fi # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext41=" Veuillez entrer l'adresse Web du r�pertoire $cgi_bin. En g�n�ral, c'est http://localhost/cgi-bin, ou http://127.0.0.1/cgi-bin, ou http://votre-ordinateur-nom/cgi-bin, ou http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]" # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext41=" ����������, ������� ���-����� ���������� $cgi_bin. ������ ��� ����� ���� http://localhost/cgi-bin, ��� http://127.0.0.1/cgi-bin, ��� http://your-computer-name/cgi-bin ��� http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]." # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext41=" Por favor ingrese la direcci�n Web del directorio $cgi_bin. En t�rminos generales �ste puede ser http://localhost/cgi-bin, http://127.0.0.1/cgi-bin, http://your-computer-name/cgi-bin o http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]" # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext41=" Please enter the web address of the $cgi_bin directory. Typically this might be http://localhost/cgi-bin, or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin, or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]" fi echo "$itext41" echo "$itext41" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" != "x" ]; then web_cgi="$ans" fi # get public_html directory echo "$itext42" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" if [ "$logname" != "root" ]; then echo "$itext29" echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD" fi echo "$itext43" echo "$itext43" >> "${gsdlhome}/INSTALL_RECORD" if [ "$logname" != "root" ]; then echo "$itext44" echo "$itext44" >> "${gsdlhome}/INSTALL_RECORD" fi echo "$itext45" echo "$itext45" >> "${gsdlhome}/INSTALL_RECORD" found="no" remind_ph="no" remind_ph_nolink="no" while [ "$found" = "no" ]; do echo "$itext32" echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" = "x" -o "x$ans" = "x1" ]; then found="yes" public_html="$gsdlhome" # no link echo "$itext46" echo "$itext46" >> "${gsdlhome}/INSTALL_RECORD" remind_ph="yes" elif [ "x$ans" = "x2" ]; then found="yes" # external public_html echo public_html="/home/${logname}/public_html" if [ "$logname" = "root" ]; then public_html="/usr/local/apache/htdocs" fi # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext47="Entrez le r�pertoire qui est accessible � partir du Web [${public_html}]" # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext47="������� ����������, ������� �������� ����� ��������� �� ���� [${public_html}]" # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext47="Ingrese un directorio que tambi�n sea accesible desde la Web [${public_html}]" # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext47="Enter directory that is also accessible from the web [${public_html}]" fi echo "$itext47" echo "$itext47" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" "> " read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" != "x" ]; then public_html="$ans" fi # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext48=" Impossible d'�crire dans le r�pertoire $public_html. Vous devrez cr�er un lien symbolique appel� gsdl de $public_html vers $gsdlhome apr�s cette installation. On vous le rappellera encore une fois � la fin de la proc�dure d'installation." # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext48=" ���������� ������ � ���������� $public_html. ��� ����� ���������� ������� �����, ���������� gsdl, �� $public_html � $gsdlhome ����� ����, ��� ��� ����������� ���������. ��� ����� ��������� �� ���� ����� � ����� ��������� �����������." # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext48=" No se puede escribir en el directorio $public_html. Usted necesita crear un v�nculo llamado gsdl de $public_html a $gsdlhome despu�s de terminar la instalaci�n. Se le recordar� esto nuevamente al final del proceso de instalaci�n." # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext48=" Unable to write to $public_html directory. You will need to create a link called gsdl from $public_html to $gsdlhome after this installation is completed. You'll be reminded of this again at the end of the installation procedure." fi # create link to gsdl (and update Uninstall.sh) if [ -w "$public_html" ]; then cd "$gsdlhome" echo "#!/bin/sh" > Uninstall.sh echo "" >> Uninstall.sh echo "$cmd_rm \"$public_html/gsdl\"" >> Uninstall.sh echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh echo "read ans" >> Uninstall.sh echo "if [ \"x\$ans\" = \"x\" -o \"\x$ans\" = \"xy\" ]; then" >> Uninstall.sh echo " exec $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh echo "fi" >> Uninstall.sh $cmd_chmod u+x Uninstall.sh cd "$thisdir" msg="--> Install.sh: [cd \"$public_html\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" cd "$public_html" msg="--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" $cmd_ln "$gsdlhome" gsdl msg="--> Install.sh: [cd \"$thisdir\"]" echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" cd "$thisdir" else echo "$itext48" echo "$itext48" >> "${gsdlhome}/INSTALL_RECORD" old_ph=$public_html remind_ph_nolink="yes" fi public_html="${public_html}/gsdl" fi done # ------------------------------------------------------------------------------ # MORE FRENCH STRINGS # ------------------------------------------------------------------------------ if [ "$gsdllangcode" = "fr" ]; then itext49=" Entrez l'adresse Web du r�pertoire $public_html. Elle peut �tre un url relatif (c.a.d. \"/gsdl\") ou un url complet (c.a.d. \"http://${gsdlhost}/gsdl\") [/gsdl]" itext50=" Un mot de passe est n�cessaire pour pouvoir utiliser des collections construites par des utilisateurs finaux ou pour afficher des pages permettant l'administration. Un utilisateur ayant pour nom utilisateur \"admin\" sera cr�� avec le mot de passe que vous allez entrer (c.a.d. que pour afficher les pages qui n�cessite d'authentifier l'utilisateur, vous devrez entrer \"admin\" comme nom d'utilisateur et le mot de passe que vous allez donner ici). " itext51=" L'installation de Greenstone a r�ussi." itext52=" * N'oubliez pas de configurer le serveur Web pour consid�rer le r�pertoire $cgi_bin comme �tant le r�pertoire des ex�cutables cgi." itext53=" Pour le serveur Apache, vous devrez ajouter la directive ScriptAlias suivante dans le fichier de configuration httpd.conf" itext54=" * N'oubliez pas de d�placer le contenu du r�pertoire ${gsdlhome}/cgi-bin dans le r�pertoire $cgi_bin " itext55=" * N'oubliez pas de configurer le serveur Web pour consid�rer le r�pertoire $gsdlhome comme accessible par le Web." itext56=" Pour le serveur Apache, vous devrez ajouter au fichier de configuration httpd.conf la directive Alias suivante." itext57=" N'oubliez pas de cr�er un lien symbolique appel� gsdl de $old_ph vers ${gsdlhome}. " itext58="Les messages affich�s lors de l'ex�cution de ce script ont �t� enregistr� dans ${gsdlhome}/INSTALL_RECORD. Vous pouvez enlever Greenstone de votre ordinateur � tout moment en ex�cutant le script ${gsdlhome}/Uninstall.sh. Utilisez Greenstone en rentrant l'adresse ${web_cgi}/library dans votre navigateur. " # ------------------------------------------------------------------------------ # MORE RUSSIAN STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "ru" ]; then itext49=" ������� ���-����� ���������� $public_html. ��� ����� ���� ������������� URL (��������, \"/gsdl\") ��� �� ������ URL (��������, \"http://${gsdlhost}/gsdl\") [/gsdl]" itext50=" ����� ������������ ���������� ��������� ��������� ������������ ��� ����� ��������� ������ � ����� ���������������� �������, ��� ���������� ����� ������. ������������ � ������ \"admin\" ����� ������ ��� ��� � �������, ������� �� ��������� (�� ���� ��� ����� � ����� ��������, ��������� �������������� ������������, ������� ��� ������������ \"admin\" � ������, ������� �� ���������). " itext51=" ��������� Greenstone ��������� �������." itext52=" * �� �������� ���������������� ��� ���-������ ���, ����� $cgi_bin �������� cgi-���������� �����������." itext53=" ��� ���-������� Apache ��� �������� ���������� ��������� ��������� ScriptAlias � ������ ����������������� ����� httpd.conf." itext54=" * �� �������� ����������� ���������� ${gsdlhome}/cgi-bin � $cgi_bin. " itext55=" * �� �������� ��� ���������������� ��� ���-������ ���, ����� ���������� $gsdlhome ���� �������� �� ����." itext56=" ��� ���-������� Apache ��� �������� ���������� ��������� Alias � ������ ����������������� ����� httpd.conf." itext57=" * �� �������� ������� ������, ���������� gsdl, �� $old_ph � ${gsdlhome}. " itext58="����� ����� ������� ��� ������� ��� ��� � ${gsdlhome}/INSTALL_RECORD. �� ������ ������� Greenstone �� ����� ������� � ����� �����, ����� ������ ${gsdlhome}/Uninstall.sh. ������ � Greenstone ��������� ���-�������� � ${web_cgi}/library. " # ------------------------------------------------------------------------------ # MORE SPANISH STRINGS # ------------------------------------------------------------------------------ elif [ "$gsdllangcode" = "es" ]; then itext49=" Ingrese la direcci�n Web del directorio $public_html. �sta puede ser un url relativo (p. ej. \"/gsdl\") o un url completo (p. ej. \"http://${gsdlhost}/gsdl\") [/gsdl]" itext50=" Con el fin de usar la funci�n que le permite al usuario final crear una colecci�n o para tener acceso a ciertas partes de las p�ginas de administraci�n usted deber� contar con una contrase�a. Se crear� para usted un usuario con el nombre \"admin\" y la contrase�a que usted elija (es decir, para ingresar a las p�ginas que requieran de autenticaci�n de usuario ingrese el nombre del usuario \"admin\" y la contrase�a que usted haya elegido). " itext51=" La instalaci�n de Greenstone se realiz� con �xito." itext52=" * No olvide configurar su servidor Web para que trate a $cgi_bin como un directorio ejecutable cgi." itext53=" En el caso del servidor Apache esto significa a�adir la siguiente directiva ScriptAlias a su archivo de configuraci�n httpd.conf." itext54=" * No olvide mover los contenidos de ${gsdlhome}/cgi-bin a $cgi_bin. " itext55=" * No olvide configurar su servidor Web para que trate a $gsdlhome como un directorio accesible desde la Web." itext56=" En el caso del servidor Apache esto significa a�adir la siguiente directiva Alias a su archivo de configuraci�n httpd.conf." itext57=" * No olvide crear un v�nculo llamado gsdl de $old_ph a ${gsdlhome}. " itext58="Los resultados de este gui�n han sido registrados para su uso posterior en ${gsdlhome}/INSTALL_RECORD. Usted podr� quitar el programa Greenstone de su sistema en cualquier momento que lo desee con solo ejecutar el gui�n ${gsdlhome}/Uninstall.sh. Para tener acceso a Greenstone apunte el navegador hacia ${web_cgi}/library. " # ------------------------------------------------------------------------------ # MORE ENGLISH STRINGS # ------------------------------------------------------------------------------ else itext49=" Enter the web address of the $public_html directory. This may be a relative url (e.g. \"/gsdl\") or a complete url (e.g. \"http://${gsdlhost}/gsdl\") [/gsdl]" itext50=" In order to use end-user collection building or to access certain parts of the administration pages you must have a password. A user with the username \"admin\" will be created for you with the password you provide (i.e. to enter any pages requiring user authentication enter the \"admin\" username and the password you set here). " itext51=" Greenstone installation completed successfully." itext52=" * Don't forget to configure your webserver to treat $cgi_bin as a cgi executable directory." itext53=" For the Apache webserver this means adding the following ScriptAlias directive to your httpd.conf configuration file." itext54=" * Don't forget to move the contents of ${gsdlhome}/cgi-bin to $cgi_bin " itext55=" * Don't forget to configure your webserver to treat $gsdlhome as a web accessible directory." itext56=" For the Apache webserver this means adding the following Alias directive to your httpd.conf configuration file." itext57=" * Don't forget to create a link called gsdl from $old_ph to ${gsdlhome}. " itext58="The output of this script has been recorded for you at ${gsdlhome}/INSTALL_RECORD. You may remove Greenstone from your system at any time by running the ${gsdlhome}/Uninstall.sh script. Access Greenstone by pointing a web browser at ${web_cgi}/library " fi # get httpprefix echo "$itext49" echo "$itext49" >> "${gsdlhome}/INSTALL_RECORD" printf "%s" ">" httpprefix="/gsdl" read ans echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD" if [ "x$ans" != "x" ]; then httpprefix="$ans" fi # get initial password echo "$itext50" echo "$itext50" >> "${gsdlhome}/INSTALL_RECORD" pw=`"${gsdlhome}/bin/${gsdlos}/getpw"` tmp="[admin] true administrator,colbuilder ${pw} admin ----------------------------------------------------------------------" echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db" $cmd_chmod a+rw "${gsdlhome}/etc/users.db" # add the dummy "demo" user with "demo" password for the authen-e collection (CD-ROM only) if [ "$iscdrom" = "yes" ]; then demouser="[demo] Dummy \"demo\" user with \"demo\" password for authen-e collection true demo Tpp90HTz/jz9w demo ----------------------------------------------------------------------" echo "$demouser" | ${gsdlhome}/bin/${gsdlos}/txt2db -append "${gsdlhome}/etc/users.db" $cmd_chmod a+rw "${gsdlhome}/etc/users.db" fi # enable the admin pages cd "$gsdlhome" sed "s|status\(.*\)disabled|status\1enabled|" etc/main.cfg > tmp123.txt && $cmd_mv tmp123.txt etc/main.cfg # set the default setup script language to be the installation language sed "s|gsdllang=\"\"|gsdllang=\"${gsdllangcode}\"|" setup.bash > tmp123.txt && $cmd_mv tmp123.txt setup.bash sed "s|setenv GSDLLANG .*|setenv GSDLLANG ${gsdllangcode}|" setup.csh > tmp123.txt && $cmd_mv tmp123.txt setup.csh $cmd_chmod a+x setup.* # set the default interface language to be the installation language echo >> etc/main.cfg echo "cgiarg shortname=l argdefault=$gsdllangcode" >> etc/main.cfg # create a symbolic link "strings.rb" to the appropriate resource bundle cd "$gsdlhome/perllib" $cmd_rm -f strings.rb $cmd_ln "strings_$gsdllangcode.rb" strings.rb # set the GLI script language to be the installation language cd "$gsdlhome/gli" sed "s|glilang=.*|glilang=$gsdllangcode|" clean.sh > tmp123.txt && $cmd_mv tmp123.txt clean.sh sed "s|glilang=.*|glilang=$gsdllangcode|" document.sh > tmp123.txt && $cmd_mv tmp123.txt document.sh sed "s|glilang=.*|glilang=$gsdllangcode|" gli.sh > tmp123.txt && $cmd_mv tmp123.txt gli.sh sed "s|glilang=.*|glilang=$gsdllangcode|" makegli.sh > tmp123.txt && $cmd_mv tmp123.txt makegli.sh $cmd_chmod a+x *.sh $cmd_rm -f *.bat # set the default GLI interface language to be the installation language sed "s|Argument name=\"general.locale\">.*<|Argument name=\"general.locale\">$gsdllangcode<|" classes/xml/config.xml > tmp123.txt && $cmd_mv tmp123.txt classes/xml/config.xml # edit gsdlsite.cfg cd "$cgi_bin" sed "s|\(gsdlhome *\)[^ ]*|\1\"${gsdlhome}\"|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg # success echo "$itext51" echo "$itext51" >> "${gsdlhome}/INSTALL_RECORD" if [ "$remind_cgi" = "yes" ]; then echo "$itext52" echo "$itext52" >> "${gsdlhome}/INSTALL_RECORD" apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"` cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"` cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"` msg="$itext53 ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\" AllowOverride None Options None Order allow,deny Allow from all " echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" fi if [ "$remind_cgi_nomove" = "yes" ]; then echo "$itext54" echo "$itext54" >> "${gsdlhome}/INSTALL_RECORD" fi if [ "$remind_ph" = "yes" ]; then echo "$itext55" echo "$itext55" >> "${gsdlhome}/INSTALL_RECORD" apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"` public_html_slash=`echo "$public_html" | sed "s|/*$|/|"` public_html_noslash=`echo "$public_html" | sed "s|/*$||"` msg="$itext56 Alias ${apache_httpprefix} \"${public_html_slash}\" Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all " echo "$msg" echo "$msg" >> "${gsdlhome}/INSTALL_RECORD" fi if [ "$remind_ph_nolink" = "yes" ]; then echo "$itext57" echo "$itext57" >> "${gsdlhome}/INSTALL_RECORD" fi echo "$itext58" echo "$itext58" >> "${gsdlhome}/INSTALL_RECORD" # write VERSION file for automatic updating in the future echo "Version: 2.75" > "${gsdlhome}/VERSION" if [ "$iscdrom" = "yes" ]; then echo "Media: CD" >> "${gsdlhome}/VERSION" else echo "Media: Web" >> "${gsdlhome}/VERSION" fi echo "OS: $gsdlos" >> "${gsdlhome}/VERSION" echo "Language: $gsdllangcode" >> "${gsdlhome}/VERSION" if [ "$docs" = "yes" ]; then echo "Option: Documentation" >> "${gsdlhome}/VERSION" fi if [ "$export" = "yes" ]; then echo "Option: Export to CD" >> "${gsdlhome}/VERSION" fi if [ "$compile" = "yes" ]; then echo "Option: Web Library" >> "${gsdlhome}/VERSION" else echo "Option: Source" >> "${gsdlhome}/VERSION" fi exit 0