source: trunk/gsdl/Install.sh@ 1474

Last change on this file since 1474 was 1474, checked in by sjboddie, 24 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 19.5 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# script must be run from within cdrom/unix directory
20if [ ! -f "${thisdir}/Install.sh" ]; then
21 echo "Install.sh must be run from the directory in which it resides"
22 echo "Greenstone was not installed"
23 exit 1
24fi
25
26# check that various important directories are on the cd
27if [ ! -d "${cd_dir}/gsdl" ]; then
28 echo
29 echo "ERROR: Could not locate ${cd_dir}/gsdl"
30 echo "Greenstone was not installed"
31 exit 1
32fi
33if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then
34 echo
35 echo "ERROR: Could not locate ${cd_dir}/Unix/bin/linux"
36 echo "Greenstone was not installed"
37 exit 1
38fi
39
40
41# install to /usr/local by default if user is "root", otherwise
42# default to users home directory
43gsdlos=`uname | tr A-Z a-z`
44if [ "$gsdlos" = "linux" ]; then
45 logname=`whoami`
46else
47 logname=""
48fi
49if [ "$logname" = "" ]; then
50 logname=`logname`
51fi
52gsdlhome="/home/${logname}"
53if [ "$logname" = "root" ]; then
54 gsdlhome="/usr/local"
55fi
56
57# get gsdlhome
58echo
59echo "This script will install Greenstone on your system. Please read"
60echo "the Install.htm file that resides in the docs directory of this"
61echo "cd-rom before installing."
62echo
63echo "Note that when prompted for input, hitting \"enter\" will select"
64echo "the default (given in square brackets [] at the end of each question)."
65echo
66echo "Note also that Install.sh prints out information on any commands"
67echo "it runs on your system in the form \"--> Install.sh: [command]\"."
68echo
69echo "It is assumed throughout this installation procedure that you"
70echo "have a webserver installed on your system."
71echo
72echo "Continue? [y]"
73printf "%s" "> "
74read ans
75if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
76 echo "Greenstone was not installed"
77 exit 0
78fi
79
80echo
81echo "Enter directory to install Greenstone into. A gsdl directory"
82echo "will be created in this directory. [${gsdlhome}]"
83printf "%s" "> "
84read ans
85if [ "$ans" != "" ]; then
86 gsdlhome="$ans"
87fi
88
89if [ ! -d "$gsdlhome" ]; then
90 echo "Warning: The ${gsdlhome} directory does not exist."
91 echo "Create it? [y]"
92 printf "%s" "> "
93 read ans
94 if [ "$ans" = "" ]; then
95 ans="y"
96 fi
97 if [ "$ans" = "y" ]; then
98 echo "--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
99 $cmd_mkdir "$gsdlhome"
100 if [ ! -d "$gsdlhome" ]; then
101 echo "ERROR: failed to create $gsdlhome directory"
102 echo "Greenstone was not installed"
103 exit 1
104 fi
105 else
106 echo "Greenstone was not installed"
107 exit 0
108 fi
109fi;
110
111
112# from now on $gsdlhome includes the "/gsdl"
113gsdlhome="${gsdlhome}/gsdl"
114
115echo "--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
116$cmd_mkdir "$gsdlhome"
117if [ ! -d "$gsdlhome" ]; then
118 echo "ERROR: failed to create $gsdlhome directory"
119 echo "Greenstone was not installed"
120 exit 1
121fi
122# set permissions on gsdlhome directory (not that we should need to)
123echo "--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
124$cmd_chmod u+rwx "$gsdlhome"
125
126
127# create initial uninstall.sh
128cd "$gsdlhome"
129echo "#!/bin/sh" > uninstall.sh
130echo "" >> uninstall.sh
131echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
132echo "read ans" >> uninstall.sh
133echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
134echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
135echo "fi" >> uninstall.sh
136$cmd_chmod u+x uninstall.sh
137cd "$thisdir"
138
139echo
140echo "If this installation fails or is cancelled, run the uninstall"
141echo "script (${gsdlhome}/uninstall.sh) to clean up the partial"
142echo "installation."
143echo "Continue? [y]"
144printf "%s" "> "
145read ans
146if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
147 echo "Greenstone was not installed"
148 exit 0
149fi
150
151echo
152echo "Installing Greenstone directory structure to ${gsdlhome}"
153# copy gsdl directory across
154echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
155$cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
156
157# copy setup shell scripts across too
158echo "--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
159$cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
160
161# create the tmp directory
162echo "--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
163$cmd_mkdir "$gsdlhome/tmp"
164
165# make collect directory writable so we can install collections
166echo "--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
167$cmd_chmod u+rwx "$gsdlhome/collect"
168
169# which collections do we want
170cd "${cd_dir}/collect"
171files=*
172first="yes"
173for file in $files
174do
175 if [ "$first" = "yes" ]; then
176 echo
177 echo "The Greenstone demonstration collection has been installed. Would you"
178 echo "like to install any other collections from the installation cd-rom? [y]"
179 read ans
180 if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
181 break
182 fi
183 first="no"
184 fi
185
186 echo
187 echo "Install the $file collection? [y]"
188 printf "%s" "> "
189 read ans
190 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
191 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/$file\" \"${gsdlhome}/collect\"]"
192 $cmd_cpr "${cd_dir}/collect/$file" "${gsdlhome}/collect"
193 fi
194done
195
196# set permissions
197echo
198echo "Setting permissions ..."
199echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
200$cmd_chmod -R u+rw "$gsdlhome"
201# gsdl/etc needs to be globally writable
202echo "--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc\"]"
203$cmd_chmod a+w "$gsdlhome/etc"
204
205# should gsdl/collect and gsdl/tmp be globally writable?
206echo
207echo "In order for end-user collection building to be enabled the"
208echo "Greenstone cgi program must be able to write to the"
209echo "${gsdlhome}/collect and ${gsdlhome}/tmp directories."
210echo "On most systems this means they must be globally writable."
211echo "Make these directories globally writable? [y]"
212printf "%s" "> "
213read ans
214if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
215 echo "--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/collect\"]"
216 $cmd_chmod a+w "$gsdlhome/collect"
217 echo "--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/tmp\"]"
218 $cmd_chmod a+w "$gsdlhome/tmp"
219fi
220
221# binaries or source code?
222compile="yes"
223if [ "$gsdlos" = "linux" ]; then
224 echo
225 echo "You may either install pre-compiled, statically linked linux [b]inaries"
226 echo "or install and [c]ompile the Greenstone source code"
227
228 found=no
229 while [ "$found" = "no" ]; do
230 echo "Enter \"[b]\" or \"c\""
231 printf "%s" "> "
232 read ans
233 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
234 compile="no"
235 # install binaries
236 echo
237 echo "Installing linux binaries"
238 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\" ]"
239 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
240 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
241 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
242 echo "--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
243 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
244
245 # move library executable to cgi-bin
246 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
247 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
248
249 found="yes"
250 elif [ "$ans" = "c" ]; then
251 found="yes"
252 fi
253 done
254fi
255
256if [ "$compile" = "yes" ]; then
257 # install source
258 echo
259 echo "Installing source code"
260 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
261 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
262 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
263 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
264 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
265 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
266 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
267 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
268 echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
269 $cmd_chmod -R u+rw "$gsdlhome"
270
271 # compile it
272 echo "--> Install.sh: [cd $gsdlhome]"
273 cd "$gsdlhome"
274 echo "configuring ..."
275 echo
276 echo "--> Install.sh: [./configure]"
277 ./configure
278 echo "compiling ..."
279 echo
280 echo "--> Install.sh: [make]"
281 make
282 echo "installing ..."
283 echo
284 echo "--> Install.sh: [make install]"
285 make install
286 echo "--> Install.sh: [cd $thisdir]"
287 cd "$thisdir"
288
289 # check that things compiled ok
290 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
291 echo
292 echo "ERROR: Compilation failed"
293 echo "Greenstone was not installed successfully"
294 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
295 echo "to clean up the partial installation."
296 exit 1
297 fi
298fi
299
300
301# try to find out hostname
302if [ "$gsdlos" = "linux" ]; then
303 hostname=`hostname -f`
304 if [ "$hostname" = "" ]; then
305 hostname=`hostname -i`
306 fi
307fi
308if [ "$hostname" = "" ]; then
309 hostname=`hostname`
310fi
311if [ "$hostname" = "" ]; then
312 hostname="your-computer-name"
313fi
314
315
316# get cgi-bin directory
317echo
318echo
319echo "Greenstone needs a valid cgi executable directory (normally called"
320echo "cgi-bin on unix systems) from which to run."
321echo "This may be either:"
322echo " 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin)."
323echo " If you use the Greenstone default you will need to configure"
324echo " your webserver to treat this directory as a cgi executable"
325echo " directory. For the Apache webserver you use the ScriptAlias"
326echo " directive to do this."
327if [ "$logname" != "root" ]; then
328echo " Note that you will probably need help from your system"
329echo " administrator to reconfigure your webserver."
330fi
331echo " 2. An existing cgi-bin directory. Normally a cgi-bin directory"
332echo " is created when your webserver is installed. Typically, this"
333echo " might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or"
334echo " /var/lib/apache/cgi-bin."
335if [ "$logname" != "root" ]; then
336 echo " Many systems also allow individual users to have their own"
337 echo " cgi-bin in /home/username/public_html/cgi-bin."
338fi
339found=no
340remind_cgi="no"
341remind_cgi_nomove="no"
342while [ "$found" = "no" ]; do
343 echo "Enter \"[1]\" or \"2\""
344 printf "%s" "> "
345 read ans
346 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
347 found="yes"
348 cgi_bin="${gsdlhome}/cgi-bin"
349 # default gsdl cgi-bin, do nothing
350 echo
351 echo "Don't forget to configure your webserver to treat $cgi_bin"
352 echo "as a cgi executable directory."
353 remind_cgi="yes"
354 elif [ "$ans" = "2" ]; then
355 found="yes"
356 # external cgi-bin
357 echo
358 echo "Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
359 printf "%s" "> "
360 read ans
361 if [ "$ans" = "" ]; then
362 cgi_bin="/usr/local/apache/cgi-bin"
363 else
364 cgi_bin="$ans"
365 fi
366 if [ ! -d "$cgi_bin" ]; then
367 echo "Warning: The ${cgi_bin} directory does not exist."
368 echo "Create it? [y]"
369 printf "%s" "> "
370 read ans
371 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
372 echo "--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
373 $cmd_mkdir "$cgi_bin"
374 if [ -d "$cgi_bin" ]; then
375 echo "Don't forget to configure your webserver to treat $cgi_bin"
376 echo "as a cgi executable directory."
377 remind_cgi="yes"
378 else
379 echo "ERROR: failed to create $cgi_bin directory"
380 echo "Greenstone installation failed."
381 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
382 echo "to clean up the partial installation."
383 exit 1
384 fi
385 fi
386 fi
387
388 if [ ! -w "$cgi_bin" ]; then
389 echo
390 echo "Unable to write to $cgi_bin directory. You will need"
391 echo "to copy the contents of ${gsdlhome}/cgi-bin"
392 echo "to $cgi_bin after this installation is completed."
393 remind_cgi_nomove="yes"
394 else
395 # install cgi-bin stuff (update the uninstall script first)
396 cd "$gsdlhome"
397 echo "#!/bin/sh" > uninstall.sh
398 echo "" >> uninstall.sh
399 echo "$cmd_rm \"${cgi_bin}/GSDLHOME.pm\"" >> uninstall.sh
400 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
401 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
402 echo "$cmd_rm \"${cgi_bin}/webpage_buildcol.pl\"" >> uninstall.sh
403 echo "$cmd_rm \"${cgi_bin}/webpage_buildstatus.pl\"" >> uninstall.sh
404 echo "$cmd_rm \"${cgi_bin}/webpage_delcol.pl\"" >> uninstall.sh
405 echo "$cmd_rm \"${cgi_bin}/webpage_editcol.pl\"" >> uninstall.sh
406 echo "$cmd_rm \"${cgi_bin}/webpage_mkcol.pl\"" >> uninstall.sh
407 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
408 echo "read ans" >> uninstall.sh
409 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
410 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
411 echo "fi" >> uninstall.sh
412 $cmd_chmod u+x uninstall.sh
413 cd "$thisdir"
414
415 echo
416 echo "Installing Greenstone cgi programs in $cgi_bin"
417 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/GSDLHOME.pm\" \"$cgi_bin\"]"
418 $cmd_mv "${gsdlhome}/cgi-bin/GSDLHOME.pm" "$cgi_bin"
419 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
420 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
421 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
422 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
423 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/webpage_buildcol.pl\" \"$cgi_bin\"]"
424 $cmd_mv "${gsdlhome}/cgi-bin/webpage_buildcol.pl" "$cgi_bin"
425 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/webpage_buildstatus.pl\" \"$cgi_bin\"]"
426 $cmd_mv "${gsdlhome}/cgi-bin/webpage_buildstatus.pl" "$cgi_bin"
427 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/webpage_delcol.pl\" \"$cgi_bin\"]"
428 $cmd_mv "${gsdlhome}/cgi-bin/webpage_delcol.pl" "$cgi_bin"
429 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/webpage_editcol.pl\" \"$cgi_bin\"]"
430 $cmd_mv "${gsdlhome}/cgi-bin/webpage_editcol.pl" "$cgi_bin"
431 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/webpage_mkcol.pl\" \"$cgi_bin\"]"
432 $cmd_mv "${gsdlhome}/cgi-bin/webpage_mkcol.pl" "$cgi_bin"
433 fi
434 fi
435done
436
437# web address of cgi-bin
438web_cgi="http://${hostname}/cgi-bin"
439echo
440echo "Please enter the web address of the $cgi_bin"
441echo "directory. Typically this might be http://localhost/cgi-bin,"
442echo "or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,"
443echo "or http://nnn.nnn.nnn.nn/cgi-bin. [http://${hostname}/cgi-bin]"
444printf "%s" "> "
445read ans
446if [ "$ans" != "" ]; then
447 web_cgi="$ans"
448fi
449
450# get public_html directory
451echo
452echo
453echo "In order for Greenstone to run, the $gsdlhome"
454echo "directory and all it contains must be accessible from the web."
455echo "To make this happen you may either:"
456echo " 1. Configure your webserver so that $gsdlhome"
457echo " is itself accessible from the web."
458if [ "$logname" != "root" ]; then
459echo " Note that you will probably need help from your system"
460echo " administrator to reconfigure your webserver."
461fi
462echo " 2. Provide an existing web accessible directory from which"
463echo " a symbolic link will be made to $gsdlhome."
464echo " When your server was installed a web accessible directory"
465echo " will have been created (the Apache webserver uses the"
466echo " DocumentRoot directive to define this directory). Typically"
467echo " this directory might be /home/httpd/html, or /usr/local/apache/htdocs,"
468echo " or /var/lib/apache/htdocs."
469if [ "$logname" != "root" ]; then
470 echo " Many systems also allow individual users to have their own"
471 echo " web accessible directory in /home/username/public_html."
472fi
473echo " Note that your web server will need to be configured to allow"
474echo " symbolic links from within this directory. For the Apache"
475echo " server that means this directory must be configured with"
476echo " the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache"
477echo " installations are configured this way by default)."
478found="no"
479remind_ph="no"
480remind_ph_nolink="no"
481while [ "$found" = "no" ]; do
482 echo "Enter \"[1]\" or \"2\""
483 printf "%s" "> "
484 read ans
485 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
486 found="yes"
487 public_html="$gsdlhome"
488 # no link
489 echo
490 echo "Don't forget to configure your webserver to make $gsdlhome"
491 echo "accessible from the web."
492 remind_ph="yes"
493 elif [ "$ans" = "2" ]; then
494 found="yes"
495 # external public_html
496 echo
497 public_html="/home/${logname}/public_html"
498 if [ "$logname" = "root" ]; then
499 public_html="/usr/local/apache/htdocs"
500 fi
501 echo "Enter directory that is also accessible from the web [${public_html}]"
502 printf "%s" "> "
503 read ans
504 if [ "$ans" != "" ]; then
505 public_html="$ans"
506 fi
507 # create link to gsdl (and update uninstall.sh)
508 if [ -w "$public_html" ]; then
509 cd "$gsdlhome"
510 echo "#!/bin/sh" > uninstall.sh
511 echo "" >> uninstall.sh
512 echo "$cmd_rm \"$public_html/gsdl\"" >> uninstall.sh
513 echo "$cmd_rm \"${cgi_bin}/GSDLHOME.pm\"" >> uninstall.sh
514 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
515 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
516 echo "$cmd_rm \"${cgi_bin}/webpage_buildcol.pl\"" >> uninstall.sh
517 echo "$cmd_rm \"${cgi_bin}/webpage_buildstatus.pl\"" >> uninstall.sh
518 echo "$cmd_rm \"${cgi_bin}/webpage_delcol.pl\"" >> uninstall.sh
519 echo "$cmd_rm \"${cgi_bin}/webpage_editcol.pl\"" >> uninstall.sh
520 echo "$cmd_rm \"${cgi_bin}/webpage_mkcol.pl\"" >> uninstall.sh
521 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
522 echo "read ans" >> uninstall.sh
523 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
524 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
525 echo "fi" >> uninstall.sh
526 $cmd_chmod u+x uninstall.sh
527 cd "$thisdir"
528
529 echo "--> Install.sh: [cd \"$public_html\"]"
530 cd "$public_html"
531 echo "--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
532 $cmd_ln "$gsdlhome" gsdl
533 echo "--> Install.sh: [cd \"$thisdir\"]"
534 cd "$thisdir"
535 else
536 echo
537 echo "Unable to write to $public_html directory. You will need"
538 echo "to create a link called gsdl from $public_html to"
539 echo "$gsdlhome after this installation is completed."
540 old_ph=$public_html
541 remind_ph_nolink="yes"
542 fi
543 public_html="${public_html}/gsdl"
544 fi
545done
546
547
548# get httpprefix
549echo
550echo "Enter the web address of the $public_html directory."
551echo "This may be a relative url (e.g. \"/gsdl\") or a"
552echo "complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
553printf "%s" ">"
554httpprefix="/gsdl"
555read ans
556if [ "$ans" != "" ]; then
557 httpprefix="$ans"
558fi
559
560# edit gsdlsite.cfg
561cd "$cgi_bin"
562sed "s|\(gsdlhome *\)[^ ]*|\1${gsdlhome}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
563sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
564sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
565
566echo
567echo
568echo "Greenstone installation completed successfully."
569if [ "$remind_cgi" = "yes" ]; then
570 echo " * Don't forget to configure your webserver to treat"
571 echo " $cgi_bin as a cgi executable directory."
572fi
573if [ "$remind_cgi_nomove" = "yes" ]; then
574 echo " * Don't forget to move the contents of ${gsdlhome}/cgi-bin"
575 echo " to $cgi_bin"
576fi
577if [ "$remind_ph" = "yes" ]; then
578 echo " * Don't forget to configure your webserver to treat"
579 echo " $gsdlhome as a web accessible directory."
580fi
581if [ "$remind_ph_nolink" = "yes" ]; then
582 echo " * Don't forget to create a link called gsdl from $old_ph"
583 echo " to ${gsdlhome}."
584fi
585echo "You may remove Greenstone from your system at any time by running"
586echo "the ${gsdlhome}/uninstall.sh script."
587echo "Access Greenstone by pointing a web browser at"
588echo " ${web_cgi}/library"
589echo "Access administration pages by pointing a web browser at"
590echo " ${web_cgi}/library?a=status"
591echo "Access end-user collection building by pointing a web browser at"
592echo " ${web_cgi}/library?a=collector"
593echo
594
595exit 0
Note: See TracBrowser for help on using the repository browser.