Annotation of capa/capa51/CapaTools/installcapa.pl, revision 1.1
1.1 ! albertel 1: #!/usr/local/bin/perl
! 2: require('getopts.pl');
! 3:
! 4: #
! 5: # CAPA installation script version 1.0
! 6: #
! 7: # Installation is a multi-phased operation and
! 8: # can start in any point
! 9: #
! 10: # -m [menu mode (interactive mode)]
! 11: # -c [install a class]
! 12: #
! 13: #
! 14: sub S_Enterpath {
! 15: local($set)=@_;
! 16: local($notdone,$path);
! 17:
! 18: $notdone = 1;
! 19: while ($notdone) {
! 20: print "Please enter the CLASS absolute path:\n";
! 21: $path = <>; chomp($path);
! 22: if( $path =~ /\/$/ ) {
! 23: $Rfullpath = "$path" . "records";
! 24: $Lfullpath = "$path" . "records/log$set.db";
! 25: $Wfullpath = "$path" . "records/weblog$set.db";
! 26: } else {
! 27: $Rfullpath = "$path" . "/records";
! 28: $Lfullpath = "$path" . "/records/log$set.db";
! 29: $Wfullpath = "$path" . "/records/weblog$set.db";
! 30: }
! 31: if( -d $path ) {
! 32: if( -d $Rfullpath ) {
! 33: if( -f $Lfullpath ) {
! 34: $notdone = 0;
! 35: } else {
! 36: print "File [$Lfullpath] does not exist!\n";
! 37: }
! 38: if( -f $Wfullpath ) {
! 39: $notdone = 0;
! 40: } else {
! 41: print "File [$Wfullpath] does not exist!\n";
! 42: }
! 43: } else {
! 44: print "Directory [$Rfullpath] does not exist!\n";
! 45: }
! 46: } else {
! 47: print "Directory [$path] does not exist!\n";
! 48: }
! 49:
! 50: }
! 51: return ($path);
! 52: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>