source: trunk/gsdl/Install.sh@ 2855

Last change on this file since 2855 was 2855, checked in by sjboddie, 22 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 34.6 KB
Line 
1#!/bin/sh
2
3## Install.sh -- Install Greenstone
4
5cmd_cp="cp"
6cmd_cpr="cp -r"
7cmd_chmod="chmod"
8cmd_mkdir="mkdir -p"
9cmd_ln="ln -s"
10cmd_mv="mv"
11cmd_rm="rm -i"
12cmd_rmr="rm -r"
13
14thisdir=`pwd`
15cd ..
16cd_dir=`pwd`
17cd "$thisdir"
18
19# install to /usr/local by default if user is "root", otherwise
20# default to users home directory
21gsdlos=`uname | tr A-Z a-z`
22if [ "$gsdlos" = "linux" ]; then
23 logname=`whoami`
24else
25 logname=""
26fi
27if [ "$logname" = "" ]; then
28 logname=`logname`
29fi
30gsdlhome="/home/${logname}"
31if [ "$logname" = "root" ]; then
32 gsdlhome="/usr/local"
33fi
34
35
36itext0="Greenstone was not installed"
37
38itext1="Install.sh must be run from the directory in which it resides"
39
40itext2="ERROR: Could not locate "
41
42itext3="This script will install Greenstone on your system. You may want
43to skim through the Install.pdf document that resides in the docs
44directory on this cd-rom before continuing with the installation.
45
46Note that when prompted for input, hitting \"enter\" will select
47the default (given in square brackets [] at the end of each question).
48If you're unsure which option to select, use the default.
49
50Note also that Install.sh prints out information on any commands
51it runs on your system in the form \"--> Install.sh: [command]\".
52
53It is assumed throughout this installation procedure that you
54have a webserver installed on your system.
55
56For later reference the output of this install script will be
57recorded in a file called INSTALL_RECORD in the directory into
58which you choose to install Greenstone.
59
60Continue? [y]"
61
62itext4="
63Which directory should Greenstone be installed to?
64Make sure that this directory is on a partition with sufficient
65free disk space for the installation options you intend selecting."
66
67itext5="
68 * A linux binary installation requires approximately
69 40Mb."
70
71itext6="
72 * Compiling Greenstone from source code requires
73 approximately 155Mb.
74 * Optional Greenstone demonstration collections may use up
75 to a further 200Mb (you'll be told the size of each individual
76 collection before you install it).
77 * Online documentation requires a further 4Mb.
78 * Enabling Greenstone's \"CD exporting\" function requires a
79 further 24Mb.
80Enter directory to install Greenstone into. A gsdl directory
81will be created in this directory. [${gsdlhome}]"
82
83itext7="
84Warning: The ${gsdlhome} directory does not exist.
85Create it? [y]"
86
87itext8="ERROR: failed to create $gsdlhome directory"
88
89itext9="
90If this installation fails or is cancelled, run the uninstall
91script (${gsdlhome}/Uninstall.sh) to clean up the partial
92installation.
93Continue? [y]"
94
95itext10="
96Installing Greenstone directory structure to ${gsdlhome}"
97
98itext11="
99Would you like to install the Greenstone documentation to your
100hard drive? The docs will use about 4Mb of space. If you choose
101not to install them you can still access them from within the
102docs directory of the cd-rom) [y]"
103
104itext12="
105Would you like to install support for Greenstone's \"CD exporting\"
106function? This function allows you to export a Greenstone collection
107in a form suitable for writing to a self-installing Windows cd-rom.
108This package will use approximately 23Mb of disk space [n]"
109
110itext13="
111The Greenstone demonstration collection has been installed. Would you
112like to install any other collections from the installation cd-rom? [y]
113(note that only the built indexes will be installed for these
114collections - if you require the original source documents you may
115manually copy them from the \"collect\" directory of the cd-rom)"
116
117itext14="
118Install the Greenstone mailing list archive (gsarch) - 3Mb? [y]"
119
120itext15="
121Install the MSWord/PDF/RTF/Postscript demonstration collection (wordpdf) - 4Mb? [y]"
122
123itext16="
124Install the Chinese demonstration collection (chinese) - 1Mb? [y]"
125
126itext17="
127Install the Humanity Development Library subset (hdlsub) - 150 Mb? [y]"
128
129itext18="Setting permissions ..."
130
131itext19="
132In order for end-user collection building to be enabled the
133Greenstone cgi program must be able to write to the
134${gsdlhome}/collect and ${gsdlhome}/tmp directories.
135On most systems this means they must be globally writable.
136Make these directories globally writable? [y]"
137
138itext20="
139You may either install pre-compiled, statically linked linux [b]inaries
140(i386 only) or install and [c]ompile the Greenstone source code"
141
142itext21="Enter \"[b]\" or \"c\""
143
144itext22="Installing linux binaries"
145
146itext23="Installing source code"
147
148itext24="configuring ..."
149
150itext25="compiling ..."
151
152itext26="installing ..."
153
154itext27="ERROR: Compilation failed"
155
156itext28="
157
158Greenstone needs a valid cgi executable directory (normally called
159cgi-bin on unix systems) from which to run.
160This may be either:
161 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin).
162 If you use the Greenstone default you will need to configure
163 your webserver to treat this directory as a cgi executable
164 directory. For the Apache webserver you use the ScriptAlias
165 directive to do this (details of how to configure your webserver
166 will be displayed at the end of this installation procedure)."
167
168itext29=" Note that you will probably need help from your system
169 administrator to reconfigure your webserver."
170
171itext30=" 2. An existing cgi-bin directory. Normally a cgi-bin directory
172 is created when your webserver is installed. Typically, this
173 might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or
174 /var/lib/apache/cgi-bin."
175
176itext31=" Many systems also allow individual users to have their own
177 cgi-bin in /home/username/public_html/cgi-bin."
178
179itext32="Enter \"[1]\" or \"2\""
180
181itext33="
182Don't forget to configure your webserver to treat $cgi_bin
183as a cgi executable directory. Don't worry, you'll be
184reminded of this again at the end of the installation
185procedure"
186
187itext34="
188Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
189
190itext35="Warning: The ${cgi_bin} directory does not exist.
191Create it? [y]"
192
193itext36="Don't forget to configure your webserver to treat $cgi_bin
194as a cgi executable directory. Don't worry, you'll be
195reminded of this again at the end of the installation
196procedure"
197
198itext37="Run the uninstall script (${gsdlhome}/Uninstall.sh)
199to clean up the partial installation."
200
201itext38="ERROR: failed to create $cgi_bin directory"
202
203itext39="
204Unable to write to $cgi_bin directory. You will need
205to copy the contents of ${gsdlhome}/cgi-bin
206to $cgi_bin after this installation is completed.
207You'll be reminded of this again at the end of the
208installation procedure."
209
210itext40="
211Installing Greenstone cgi programs in $cgi_bin"
212
213itext41="
214Please enter the web address of the $cgi_bin
215directory. Typically this might be http://localhost/cgi-bin,
216or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,
217or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
218
219itext42="
220
221In order for Greenstone to run, the $gsdlhome
222directory and all it contains must be accessible from the web.
223To make this happen you may either:
224 1. Configure your webserver so that $gsdlhome
225 is itself accessible from the web."
226
227itext43=" 2. Provide an existing web accessible directory from which
228 a symbolic link (ln -s) will be made to $gsdlhome.
229 When your server was installed a web accessible directory
230 will have been created (the Apache webserver uses the
231 DocumentRoot directive to define this directory). Typically
232 this directory might be /home/httpd/html, or /usr/local/apache/htdocs,
233 or /var/lib/apache/htdocs."
234
235itext44=" Many systems also allow individual users to have their own
236 web accessible directory in /home/username/public_html."
237
238itext45=" Note that your web server will need to be configured to allow
239 symbolic links from within this directory. For the Apache
240 server that means this directory must be configured with
241 the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache
242 installations are configured this way by default)."
243
244itext46="
245Don't forget to configure your webserver to make $gsdlhome
246accessible from the web. You'll be reminded of this again
247at the end of this installation procedure."
248
249itext47="Enter directory that is also accessible from the web [${public_html}]"
250
251itext48="
252Unable to write to $public_html directory. You will need
253to create a link called gsdl from $public_html to
254$gsdlhome after this installation is completed. You'll be
255reminded of this again at the end of the installation
256procedure."
257
258itext49="
259Enter the web address of the $public_html directory.
260This may be a relative url (e.g. \"/gsdl\") or a
261complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
262
263itext50="
264In order to use end-user collection building or to access certain
265parts of the administration pages you must have a password.
266A user with the username \"admin\" will be created for you with
267the password you provide (i.e. to enter any pages requiring user
268authentication enter the \"admin\" username and the password you
269set here).
270"
271
272itext51="
273
274Greenstone installation completed successfully."
275
276itext52=" * Don't forget to configure your webserver to treat
277 $cgi_bin as a cgi executable directory."
278
279itext53=" For the Apache webserver this means adding the following
280 ScriptAlias directive to your httpd.conf configuration file."
281
282itext54=" * Don't forget to move the contents of ${gsdlhome}/cgi-bin
283 to $cgi_bin
284"
285
286itext55=" * Don't forget to configure your webserver to treat
287 $gsdlhome as a web accessible directory."
288
289itext56=" For the Apache webserver this means adding the following
290 Alias directive to your httpd.conf configuration file."
291
292itext57=" * Don't forget to create a link called gsdl from $old_ph
293 to ${gsdlhome}.
294"
295
296itext58="The output of this script has been recorded for you at
297${gsdlhome}/INSTALL_RECORD.
298You may remove Greenstone from your system at any time by running
299the ${gsdlhome}/Uninstall.sh script.
300Access Greenstone by pointing a web browser at
301${web_cgi}/library
302"
303
304
305# script must be run from within cdrom/unix directory
306if [ ! -f "${thisdir}/Install.sh" ]; then
307 echo "$itext1"
308 echo "$itext0"
309 exit 1
310fi
311
312# check that various important directories are on the cd
313if [ ! -d "${cd_dir}/gsdl" ]; then
314 echo
315 echo "${itext2}${cd_dir}/gsdl"
316 echo "$itext0"
317 exit 1
318fi
319if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then
320 echo
321 echo "${itext2}${cd_dir}/Unix/bin/linux"
322 echo "$itext0"
323 exit 1
324fi
325
326# get gsdlhome
327echo "$itext3"
328printf "%s" "> "
329read ans
330log="${log}${itext3}
331> $ans
332"
333if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
334 echo "$itext0"
335 exit 0
336fi
337
338msg="$itext4"
339if [ "$gsdlos" = "linux" ]; then
340msg="${msg}$itext5"
341fi
342msg="${msg}$itext6"
343echo "$msg"
344printf "%s" "> "
345read ans
346log="${log}${msg}
347> $ans
348"
349if [ "$ans" != "" ]; then
350 gsdlhome="$ans"
351fi
352
353if [ ! -d "$gsdlhome" ]; then
354 echo "$itext7"
355 printf "%s" "> "
356 read ans
357 log="${log}${itext7}
358> $ans
359"
360 if [ "$ans" = "" ]; then
361 ans="y"
362 fi
363 if [ "$ans" = "y" ]; then
364 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
365 echo "$msg"
366 log="${log}${msg}
367"
368 $cmd_mkdir "$gsdlhome"
369 if [ ! -d "$gsdlhome" ]; then
370 echo "$itext8"
371 echo "$itext0"
372 exit 1
373 fi
374 else
375 echo "$itext0"
376 exit 0
377 fi
378fi
379
380# from now on $gsdlhome includes the "/gsdl"
381gsdlhome="${gsdlhome}/gsdl"
382msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
383echo "$msg"
384log="${log}${msg}
385"
386$cmd_mkdir "$gsdlhome"
387if [ ! -d "$gsdlhome" ]; then
388 echo "$itext8"
389 echo "$itext0"
390 exit 1
391fi
392# set permissions on gsdlhome directory
393msg="--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
394echo "$msg"
395log="${log}${msg}
396"
397$cmd_chmod u+rwx "$gsdlhome"
398
399# create initial Uninstall.sh
400cd "$gsdlhome"
401echo "#!/bin/sh" > Uninstall.sh
402echo "" >> Uninstall.sh
403echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
404echo "read ans" >> Uninstall.sh
405echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
406echo " $cmd_chmod -R u+rwx \"$gsdlhome\"" >> Uninstall.sh
407echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
408echo "fi" >> Uninstall.sh
409$cmd_chmod u+x Uninstall.sh
410cd "$thisdir"
411
412# create initial INSTALL_RECORD
413echo "$log" >> "${gsdlhome}/INSTALL_RECORD"
414
415echo "$itext9"
416echo "$itext9" >> "${gsdlhome}/INSTALL_RECORD"
417printf "%s" "> "
418read ans
419echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
420if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
421 msg="$itext0"
422 echo "$msg"
423 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
424 exit 0
425fi
426
427echo "$itext10"
428echo "$itext10" >> "${gsdlhome}/INSTALL_RECORD"
429
430# copy gsdl directory across
431msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
432echo "$msg"
433echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
434$cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
435
436# copy setup shell scripts across too
437msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
438echo "$msg"
439echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
440$cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
441
442# make sure we have a tmp directory
443if [ ! -d "$gsdlhome/tmp" ]; then
444 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
445 echo "$msg"
446 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
447 $cmd_mkdir "${gsdlhome}/tmp"
448fi
449
450# make collect directory writable so we can install collections
451msg="--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
452echo "$msg"
453echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
454$cmd_chmod u+rwx "$gsdlhome/collect"
455
456# do we want docs directory?
457echo "$itext11"
458echo "$itext11" >> "${gsdlhome}/INSTALL_RECORD"
459printf "%s" "> "
460read ans
461echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
462if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
463 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/docs\" \"$gsdlhome\"]"
464 echo "$msg"
465 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
466 $cmd_cpr "${cd_dir}/docs" "$gsdlhome"
467fi
468
469# do we want the "CD exporting" stuff?
470echo "$itext12"
471echo "$itext12" >> "${gsdlhome}/INSTALL_RECORD"
472printf "%s" "> "
473read ans
474echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
475if [ "$ans" = "Y" ] || [ "$ans" = "y" ]; then
476 msg="--> Install.sh: [$cmd_chmod u+rw \"${gsdlhome}/bin\"]"
477 echo "$msg"
478 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
479 $cmd_chmod u+rw "${gsdlhome}/bin"
480
481 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/bin/windows\"]"
482 echo "$msg"
483 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
484 $cmd_mkdir "${gsdlhome}/bin/windows"
485
486 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/netscape\" \"${gsdlhome}/bin/windows\"]"
487 echo "$msg"
488 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
489 $cmd_cpr "${cd_dir}/Windows/bin/windows/netscape" "${gsdlhome}/bin/windows"
490
491 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/Win32s\" \"${gsdlhome}/bin/windows\"]"
492 echo "$msg"
493 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
494 $cmd_cpr "${cd_dir}/Windows/bin/windows/Win32s" "${gsdlhome}/bin/windows"
495
496 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net16\" \"${gsdlhome}/bin/windows\"]"
497 echo "$msg"
498 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
499 $cmd_cpr "${cd_dir}/Windows/bin/windows/net16" "${gsdlhome}/bin/windows"
500
501 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net32\" \"${gsdlhome}/bin/windows\"]"
502 echo "$msg"
503 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
504 $cmd_cpr "${cd_dir}/Windows/bin/windows/net32" "${gsdlhome}/bin/windows"
505
506 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/server.exe\" \"${gsdlhome}/bin/windows\"]"
507 echo "$msg"
508 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
509 $cmd_cp "${cd_dir}/Windows/bin/windows/server.exe" "${gsdlhome}/bin/windows"
510
511 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/gssetup.exe\" \"${gsdlhome}/bin/windows\"]"
512 echo "$msg"
513 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
514 $cmd_cp "${cd_dir}/Windows/bin/windows/gssetup.exe" "${gsdlhome}/bin/windows"
515
516 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/setpw.exe\" \"${gsdlhome}/bin/windows\"]"
517 echo "$msg"
518 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
519 $cmd_cp "${cd_dir}/Windows/bin/windows/setpw.exe" "${gsdlhome}/bin/windows"
520
521 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/Setup.exe\" \"${gsdlhome}/bin/windows\"]"
522 echo "$msg"
523 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
524 $cmd_cp "${cd_dir}/Windows/bin/windows/Setup.exe" "${gsdlhome}/bin/windows"
525fi
526
527
528# which collections do we want
529cd "${cd_dir}/collect"
530echo "$itext13"
531echo "$itext13" >> "${gsdlhome}/INSTALL_RECORD"
532printf "%s" "> "
533read ans
534echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
535if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
536
537 # gsarch
538 echo "$itext14"
539 echo "$itext14" >> "${gsdlhome}/INSTALL_RECORD"
540 printf "%s" "> "
541 read ans
542 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
543 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
544
545 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/gsarch\"]"
546 echo "$msg"
547 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
548 $cmd_mkdir "${gsdlhome}/collect/gsarch"
549
550 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/etc\" \"${gsdlhome}/collect/gsarch\"]"
551 echo "$msg"
552 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
553 $cmd_cpr "${cd_dir}/collect/gsarch/etc" "${gsdlhome}/collect/gsarch"
554
555 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/images\" \"${gsdlhome}/collect/gsarch\"]"
556 echo "$msg"
557 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
558 $cmd_cpr "${cd_dir}/collect/gsarch/images" "${gsdlhome}/collect/gsarch"
559
560 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/index\" \"${gsdlhome}/collect/gsarch\"]"
561 echo "$msg"
562 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
563 $cmd_cpr "${cd_dir}/collect/gsarch/index" "${gsdlhome}/collect/gsarch"
564 fi
565
566 # wordpdf
567 echo "$itext15"
568 echo "$itext15" >> "${gsdlhome}/INSTALL_RECORD"
569 printf "%s" "> "
570 read ans
571 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
572 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
573
574 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/wordpdf\"]"
575 echo "$msg"
576 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
577 $cmd_mkdir "${gsdlhome}/collect/wordpdf"
578
579 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/etc\" \"${gsdlhome}/collect/wordpdf\"]"
580 echo "$msg"
581 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
582 $cmd_cpr "${cd_dir}/collect/wordpdf/etc" "${gsdlhome}/collect/wordpdf"
583
584 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/images\" \"${gsdlhome}/collect/wordpdf\"]"
585 echo "$msg"
586 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
587 $cmd_cpr "${cd_dir}/collect/wordpdf/images" "${gsdlhome}/collect/wordpdf"
588
589 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/index\" \"${gsdlhome}/collect/wordpdf\"]"
590 echo "$msg"
591 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
592 $cmd_cpr "${cd_dir}/collect/wordpdf/index" "${gsdlhome}/collect/wordpdf"
593 fi
594
595 # chinese
596 echo "$itext16"
597 echo "$itext16" >> "${gsdlhome}/INSTALL_RECORD"
598 printf "%s" "> "
599 read ans
600 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
601 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
602
603 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/chinese\"]"
604 echo "$msg"
605 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
606 $cmd_mkdir "${gsdlhome}/collect/chinese"
607
608 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/etc\" \"${gsdlhome}/collect/chinese\"]"
609 echo "$msg"
610 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
611 $cmd_cpr "${cd_dir}/collect/chinese/etc" "${gsdlhome}/collect/chinese"
612
613 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/images\" \"${gsdlhome}/collect/chinese\"]"
614 echo "$msg"
615 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
616 $cmd_cpr "${cd_dir}/collect/chinese/images" "${gsdlhome}/collect/chinese"
617
618 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/index\" \"${gsdlhome}/collect/chinese\"]"
619 echo "$msg"
620 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
621 $cmd_cpr "${cd_dir}/collect/chinese/index" "${gsdlhome}/collect/chinese"
622 fi
623
624 # hdlsub
625 echo "$itext17"
626 echo "$itext17" >> "${gsdlhome}/INSTALL_RECORD"
627 printf "%s" "> "
628 read ans
629 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
630 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
631
632 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/hdlsub\"]"
633 echo "$msg"
634 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
635 $cmd_mkdir "${gsdlhome}/collect/hdlsub"
636
637 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/etc\" \"${gsdlhome}/collect/hdlsub\"]"
638 echo "$msg"
639 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
640 $cmd_cpr "${cd_dir}/collect/hdlsub/etc" "${gsdlhome}/collect/hdlsub"
641
642 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/images\" \"${gsdlhome}/collect/hdlsub\"]"
643 echo "$msg"
644 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
645 $cmd_cpr "${cd_dir}/collect/hdlsub/images" "${gsdlhome}/collect/hdlsub"
646
647 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/index\" \"${gsdlhome}/collect/hdlsub\"]"
648 echo "$msg"
649 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
650 $cmd_cpr "${cd_dir}/collect/hdlsub/index" "${gsdlhome}/collect/hdlsub"
651 fi
652fi
653
654# set permissions
655msg="
656$itext18
657--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]
658--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/script/\"*]"
659echo "$msg"
660echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
661$cmd_chmod -R u+rw "$gsdlhome"
662$cmd_chmod a+x "${gsdlhome}/bin/script/"*
663
664# certain files in gsdl/etc need to be globally writable
665msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/errout.txt\"]"
666echo "$msg"
667echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
668$cmd_chmod a+w "$gsdlhome/etc/errout.txt"
669msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/initout.txt\"]"
670echo "$msg"
671echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
672$cmd_chmod a+w "$gsdlhome/etc/initout.txt"
673msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/key.db\"]"
674echo "$msg"
675echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
676$cmd_chmod a+w "$gsdlhome/etc/key.db"
677msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/users.db\"]"
678echo "$msg"
679echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
680$cmd_chmod a+w "$gsdlhome/etc/users.db"
681msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/main.cfg\"]"
682echo "$msg"
683echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
684$cmd_chmod a+w "$gsdlhome/etc/main.cfg"
685msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/history.db\"]"
686echo "$msg"
687echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
688$cmd_chmod a+w "$gsdlhome/etc/history.db"
689msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/usage.txt\"]"
690echo "$msg"
691echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
692$cmd_chmod a+w "$gsdlhome/etc/usage.txt"
693
694
695# should gsdl/collect and gsdl/tmp be globally writable?
696echo "$itext19"
697echo "$itext19" >> "${gsdlhome}/INSTALL_RECORD"
698printf "%s" "> "
699read ans
700echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
701if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
702 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
703 echo "$msg"
704 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
705 $cmd_chmod -R a+w "$gsdlhome/collect"
706 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
707 echo "$msg"
708 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
709 $cmd_chmod -R a+w "$gsdlhome/tmp"
710fi
711
712# binaries or source code?
713compile="yes"
714if [ "$gsdlos" = "linux" ]; then
715 echo "$itext20"
716 echo "$itext20" >> "${gsdlhome}/INSTALL_RECORD"
717
718 found=no
719 while [ "$found" = "no" ]; do
720 echo "$itext21"
721 echo "$itext21" >> "${gsdlhome}/INSTALL_RECORD"
722 printf "%s" "> "
723 read ans
724 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
725 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
726 compile="no"
727 # install binaries
728 msg="
729$itext22
730--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\"]"
731 echo "$msg"
732 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
733 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
734 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
735 echo "$msg"
736 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
737 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
738 msg="--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
739 echo "$msg"
740 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
741 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
742
743 # move library executable to cgi-bin
744 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
745 echo "$msg"
746 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
747 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
748
749 found="yes"
750 elif [ "$ans" = "c" ]; then
751 found="yes"
752 fi
753 done
754fi
755
756if [ "$compile" = "yes" ]; then
757 # install source
758 msg="
759$itext23
760--> Install.sh [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
761 echo "$msg"
762 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
763 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
764 msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
765 echo "$msg"
766 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
767 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
768 msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
769 echo "$msg"
770 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
771 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
772 msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
773 echo "$msg"
774 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
775 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
776 msg="--> Install.sh [$cmd_cp \"${cd_dir}/src/Install.txt\" \"$gsdlhome\"]"
777 echo "$msg"
778 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
779 $cmd_cp "${cd_dir}/src/Install.txt" "$gsdlhome"
780 msg="--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
781 echo "$msg"
782 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
783 $cmd_chmod -R u+rw "$gsdlhome"
784 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
785 echo "$msg"
786 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
787 $cmd_chmod a+x "${gsdlhome}/configure"
788 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
789 echo "$msg"
790 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
791 $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
792
793 # compile it
794 msg="--> Install.sh: [cd $gsdlhome]"
795 echo "$msg"
796 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
797 cd "$gsdlhome"
798 msg="$itext24
799
800--> Install.sh: [./configure]"
801 echo "$msg"
802 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
803 ./configure
804 msg="$itext25
805
806--> Install.sh: [make]"
807 echo "$msg"
808 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
809 make
810 msg="$itext26
811
812--> Install.sh: [make install]"
813 echo "$msg"
814 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
815 make install
816 msg="--> Install.sh: [cd $thisdir]"
817 echo "$msg"
818 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
819 cd "$thisdir"
820
821 # check that things compiled ok
822 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
823 msg="$itext27
824$itext0
825$itext37"
826 echo "$msg"
827 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
828 exit 1
829 fi
830fi
831
832
833# try to find out hostname
834if [ "$gsdlos" = "linux" ]; then
835 hostname=`hostname -f`
836 if [ "$hostname" = "" ]; then
837 hostname=`hostname -i`
838 fi
839fi
840if [ "$hostname" = "" ]; then
841 hostname=`hostname`
842fi
843if [ "$hostname" = "" ]; then
844 hostname="your-computer-name"
845fi
846
847
848# get cgi-bin directory
849echo "$itext28"
850echo "$itext28" >> "${gsdlhome}/INSTALL_RECORD"
851if [ "$logname" != "root" ]; then
852 echo "$itext29"
853 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
854fi
855echo "$itext30"
856echo "$itext30" >> "${gsdlhome}/INSTALL_RECORD"
857if [ "$logname" != "root" ]; then
858 echo "$itext31"
859 echo "$itext31" >> "${gsdlhome}/INSTALL_RECORD"
860fi
861found=no
862remind_cgi="no"
863remind_cgi_nomove="no"
864while [ "$found" = "no" ]; do
865 echo "$itext32"
866 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
867 printf "%s" "> "
868 read ans
869 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
870 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
871 found="option1"
872 cgi_bin="${gsdlhome}/cgi-bin"
873 # default gsdl cgi-bin, do nothing
874 echo "$itext33"
875 echo "$itext33" >> "${gsdlhome}/INSTALL_RECORD"
876 remind_cgi="yes"
877 elif [ "$ans" = "2" ]; then
878 found="option2"
879 # external cgi-bin
880 echo "$itext34"
881 echo "$itext34" >> "${gsdlhome}/INSTALL_RECORD"
882 printf "%s" "> "
883 read ans
884 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
885 if [ "$ans" = "" ]; then
886 cgi_bin="/usr/local/apache/cgi-bin"
887 else
888 cgi_bin="$ans"
889 fi
890 if [ ! -d "$cgi_bin" ]; then
891 echo "$itext35"
892 echo "$itext35" >> "${gsdlhome}/INSTALL_RECORD"
893 printf "%s" "> "
894 read ans
895 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
896 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
897 msg="--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
898 echo "$msg"
899 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
900 $cmd_mkdir "$cgi_bin"
901 if [ -d "$cgi_bin" ]; then
902 echo "$itext36"
903 echo "$itext36" >> "${gsdlhome}/INSTALL_RECORD"
904 remind_cgi="yes"
905 else
906 msg="$itext38
907$itext0
908$itext37"
909 echo "$msg"
910 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
911 exit 1
912 fi
913 fi
914 fi
915
916 if [ ! -w "$cgi_bin" ]; then
917 echo "$itext39"
918 echo "$itext39" >> "${gsdlhome}/INSTALL_RECORD"
919 remind_cgi_nomove="yes"
920 else
921 # install cgi-bin stuff (update the uninstall script first)
922 cd "$gsdlhome"
923 echo "#!/bin/sh" > Uninstall.sh
924 echo "" >> Uninstall.sh
925 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
926 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
927 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
928 echo "read ans" >> Uninstall.sh
929 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
930 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
931 echo "fi" >> Uninstall.sh
932 $cmd_chmod u+x Uninstall.sh
933 cd "$thisdir"
934
935 msg="$itext40
936--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
937 echo "$msg"
938 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
939 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
940 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
941 echo "$msg"
942 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
943 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
944 fi
945 fi
946done
947
948# web address of cgi-bin
949web_cgi="http://${hostname}/cgi-bin"
950if [ "$found" = "option1" ]; then
951 web_cgi="http://${hostname}/gsdl/cgi-bin"
952fi
953echo "$itext41"
954echo "$itext41" >> "${gsdlhome}/INSTALL_RECORD"
955printf "%s" "> "
956read ans
957echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
958if [ "$ans" != "" ]; then
959 web_cgi="$ans"
960fi
961
962# get public_html directory
963echo "$itext42"
964echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
965if [ "$logname" != "root" ]; then
966 echo "$itext29"
967 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
968fi
969echo "$itext43"
970echo "$itext43" >> "${gsdlhome}/INSTALL_RECORD"
971if [ "$logname" != "root" ]; then
972 echo "$itext44"
973 echo "$itext44" >> "${gsdlhome}/INSTALL_RECORD"
974fi
975echo "$itext45"
976echo "$itext45" >> "${gsdlhome}/INSTALL_RECORD"
977found="no"
978remind_ph="no"
979remind_ph_nolink="no"
980while [ "$found" = "no" ]; do
981 echo "$itext32"
982 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
983 printf "%s" "> "
984 read ans
985 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
986 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
987 found="yes"
988 public_html="$gsdlhome"
989 # no link
990 echo "$itext46"
991 echo "$itext46" >> "${gsdlhome}/INSTALL_RECORD"
992 remind_ph="yes"
993 elif [ "$ans" = "2" ]; then
994 found="yes"
995 # external public_html
996 echo
997 public_html="/home/${logname}/public_html"
998 if [ "$logname" = "root" ]; then
999 public_html="/usr/local/apache/htdocs"
1000 fi
1001 echo "$itext47"
1002 echo "$itext47" >> "${gsdlhome}/INSTALL_RECORD"
1003 printf "%s" "> "
1004 read ans
1005 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
1006 if [ "$ans" != "" ]; then
1007 public_html="$ans"
1008 fi
1009 # create link to gsdl (and update Uninstall.sh)
1010 if [ -w "$public_html" ]; then
1011 cd "$gsdlhome"
1012 echo "#!/bin/sh" > Uninstall.sh
1013 echo "" >> Uninstall.sh
1014 echo "$cmd_rm \"$public_html/gsdl\"" >> Uninstall.sh
1015 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
1016 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
1017 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
1018 echo "read ans" >> Uninstall.sh
1019 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
1020 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
1021 echo "fi" >> Uninstall.sh
1022 $cmd_chmod u+x Uninstall.sh
1023 cd "$thisdir"
1024
1025 msg="--> Install.sh: [cd \"$public_html\"]"
1026 echo "$msg"
1027 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1028 cd "$public_html"
1029 msg="--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
1030 echo "$msg"
1031 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1032 $cmd_ln "$gsdlhome" gsdl
1033 msg="--> Install.sh: [cd \"$thisdir\"]"
1034 echo "$msg"
1035 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1036 cd "$thisdir"
1037 else
1038 echo "$itext48"
1039 echo "$itext48" >> "${gsdlhome}/INSTALL_RECORD"
1040 old_ph=$public_html
1041 remind_ph_nolink="yes"
1042 fi
1043 public_html="${public_html}/gsdl"
1044 fi
1045done
1046
1047
1048# get httpprefix
1049echo "$itext49"
1050echo "$itext49" >> "${gsdlhome}/INSTALL_RECORD"
1051printf "%s" ">"
1052httpprefix="/gsdl"
1053read ans
1054echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
1055if [ "$ans" != "" ]; then
1056 httpprefix="$ans"
1057fi
1058
1059# get initial password
1060echo "$itext50"
1061echo "$itext50" >> "${gsdlhome}/INSTALL_RECORD"
1062pw=`${gsdlhome}/bin/${gsdlos}/getpw`
1063tmp="[admin]
1064<comment>
1065<enabled>true
1066<groups>administrator,colbuilder
1067<password>${pw}
1068<username>admin
1069----------------------------------------------------------------------"
1070echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
1071$cmd_chmod a+rw "${gsdlhome}/etc/users.db"
1072
1073# edit gsdlsite.cfg
1074cd "$cgi_bin"
1075sed "s|\(gsdlhome *\)[^ ]*|\1${gsdlhome}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1076sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1077sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1078
1079# success
1080echo "$itext51"
1081echo "$itext51" >> "${gsdlhome}/INSTALL_RECORD"
1082if [ "$remind_cgi" = "yes" ]; then
1083 echo "$itext52"
1084 echo "$itext52" >> "${gsdlhome}/INSTALL_RECORD"
1085
1086 apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1087 cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
1088 cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
1089
1090 msg="$itext53
1091
1092 ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\"
1093 <Directory \"${cgi_bin_noslash}\">
1094 AllowOverride None
1095 Options None
1096 Order allow,deny
1097 Allow from all
1098 </Directory>
1099"
1100 echo "$msg"
1101 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1102fi
1103if [ "$remind_cgi_nomove" = "yes" ]; then
1104 echo "$itext54"
1105 echo "$itext54" >> "${gsdlhome}/INSTALL_RECORD"
1106fi
1107if [ "$remind_ph" = "yes" ]; then
1108 echo "$itext55"
1109 echo "$itext55" >> "${gsdlhome}/INSTALL_RECORD"
1110
1111 apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1112 public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
1113 public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
1114
1115 msg="$itext56
1116
1117 Alias ${apache_httpprefix} \"${public_html_slash}\"
1118 <Directory \"${public_html_noslash}\">
1119 Options Indexes MultiViews FollowSymLinks
1120 AllowOverride None
1121 Order allow,deny
1122 Allow from all
1123 </Directory>
1124"
1125 echo "$msg"
1126 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1127fi
1128if [ "$remind_ph_nolink" = "yes" ]; then
1129 echo "$itext57"
1130 echo "$itext57" >> "${gsdlhome}/INSTALL_RECORD"
1131fi
1132echo "$itext58"
1133echo "$itext58" >> "${gsdlhome}/INSTALL_RECORD"
1134
1135exit 0
Note: See TracBrowser for help on using the repository browser.