Annotation of capa/capa51/CapaTools/installcapa.pl, revision 1.3
1.1 albertel 1: #!/usr/local/bin/perl
2: require('getopts.pl');
3:
4: #
5: # CAPA installation script version 1.0
1.2 albertel 6: # Copyright (C) 1992-2000 Michigan State University
7: #
8: # The CAPA system is free software; you can redistribute it and/or
1.3 ! albertel 9: # modify it under the terms of the GNU General Public License as
1.2 albertel 10: # published by the Free Software Foundation; either version 2 of the
11: # License, or (at your option) any later version.
12: #
13: # The CAPA system is distributed in the hope that it will be useful,
14: # but WITHOUT ANY WARRANTY; without even the implied warranty of
15: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.3 ! albertel 16: # General Public License for more details.
1.2 albertel 17: #
1.3 ! albertel 18: # You should have received a copy of the GNU General Public
1.2 albertel 19: # License along with the CAPA system; see the file COPYING. If not,
20: # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21: # Boston, MA 02111-1307, USA.
22: #
23: # As a special exception, you have permission to link this program
24: # with the TtH/TtM library and distribute executables, as long as you
25: # follow the requirements of the GNU GPL in regard to all of the
26: # software in the executable aside from TtH/TtM.
1.1 albertel 27: #
28: # Installation is a multi-phased operation and
29: # can start in any point
30: #
31: # -m [menu mode (interactive mode)]
32: # -c [install a class]
33: #
34: #
35: sub S_Enterpath {
36: local($set)=@_;
37: local($notdone,$path);
38:
39: $notdone = 1;
40: while ($notdone) {
41: print "Please enter the CLASS absolute path:\n";
42: $path = <>; chomp($path);
43: if( $path =~ /\/$/ ) {
44: $Rfullpath = "$path" . "records";
45: $Lfullpath = "$path" . "records/log$set.db";
46: $Wfullpath = "$path" . "records/weblog$set.db";
47: } else {
48: $Rfullpath = "$path" . "/records";
49: $Lfullpath = "$path" . "/records/log$set.db";
50: $Wfullpath = "$path" . "/records/weblog$set.db";
51: }
52: if( -d $path ) {
53: if( -d $Rfullpath ) {
54: if( -f $Lfullpath ) {
55: $notdone = 0;
56: } else {
57: print "File [$Lfullpath] does not exist!\n";
58: }
59: if( -f $Wfullpath ) {
60: $notdone = 0;
61: } else {
62: print "File [$Wfullpath] does not exist!\n";
63: }
64: } else {
65: print "Directory [$Rfullpath] does not exist!\n";
66: }
67: } else {
68: print "Directory [$path] does not exist!\n";
69: }
70:
71: }
72: return ($path);
73: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>