File: gpt-update

package info (click to toggle)
grid-packaging-tools 3.2globus2-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,816 kB
  • ctags: 1,621
  • sloc: perl: 19,536; sh: 3,047; makefile: 320; exp: 89
file content (35 lines) | stat: -rwxr-xr-x 843 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! perl

if ( ! ( defined eval "require 5.005" ) )
{
    die "GPT requires at least Perl version 5.005";
}

my $gpath = $ENV{GPT_LOCATION};

if (!defined($gpath))
{
  $gpath = "/usr";
}

if (!defined($gpath))
{
   error_out("GPT_LOCATION needs to be set before running this script");
}

@INC = ("$gpath/lib/perl", "$gpath/lib/perl/$Config{'archname'}", @INC);

system("$gpath/sbin/gpt_version") == 0
         or die "GPT died due to Version mismatch.  Check PATH and GPT_LOCATION\n" ;

if ( ! ( defined eval "require Grid::GPT::GPTObject" ) )
{
    die("$gpath does not appear to hold a valid GPT installation\n");
}

print "WARNING: gpt-update will soon be depreciated. Use gpt-install instead.\n";
sleep 1;

my @sysArgs = ( "$gpath/sbin/gpt-install", @ARGV );
system( @sysArgs ) == 0 or print STDERR "couldn't exec gpt-install: $!\n";
exit;