Subversion Repositories camp_sysinfo_client_3

Rev

Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 20
Line 1... Line 1...
1
#!/usr/bin/env perl
1
#!/usr/bin/env perl
2
 
2
 
3
use warnings;
3
use warnings;
4
 
4
 
-
 
5
$main::VERSION = '1.0';
-
 
6
 
5
my $thisDir = `pwd`;
7
my $thisDir = `pwd`;
6
chomp $thisDir;
8
chomp $thisDir;
7
 
9
 
8
my $targetDir = '/opt/camp/sysinfo-client';
10
my $targetDir = '/opt/camp/sysinfo-client';
9
my $modulesDir = $targetDir . '/modules';
11
my $modulesDir = $targetDir . '/modules';
Line 37... Line 39...
37
   my $prompt = shift;
39
   my $prompt = shift;
38
   my $answer = &getAnswer( $prompt, ('yes','no' ) );
40
   my $answer = &getAnswer( $prompt, ('yes','no' ) );
39
   return lc( substr( $answer, 0, 1 ) ) eq 'y';
41
   return lc( substr( $answer, 0, 1 ) ) eq 'y';
40
}
42
}
41
 
43
 
-
 
44
sub processParameters {
-
 
45
   while ( my $parameter = shift ) {
-
 
46
      if ( $parameter eq '-v' ) {
-
 
47
         print "$main::VERSION\n";
-
 
48
         exit;
-
 
49
      }
-
 
50
   } # while
-
 
51
}
-
 
52
 
-
 
53
&processParameters( @ARGV );
-
 
54
 
-
 
55
 
42
if ( &yesno( "I am getting ready to remove sysinfo-client from the system\nOk?" ) ) {
56
if ( &yesno( "I am getting ready to remove sysinfo-client from the system\nOk?" ) ) {
43
   my $removeConfig = &yesno( "Do you want me to remove the configuration also?" );
57
   my $removeConfig = &yesno( "Do you want me to remove the configuration also?" );
44
   print "Uninstalling ";
58
   print "Uninstalling ";
45
   print "and removing config" if $removeConfig;
59
   print "and removing config" if $removeConfig;
46
   `rm -fRv $targetDir`;
60
   `rm -fRv $targetDir`;