repository for casatablebrowser
Source
#!/usr/bin/perl
use qw(abs_path getcwd);
use ;
use :: ;
use :: ;
use :: ;
use :: qw(make_path remove_tree);
use ;
#Fetch failed! HTTP response: 500 Internal Server Error [500 Can't verify SSL peers without knowing which Certificate Authorities to trust] at scripts/create-app line 62.
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
$exe = ($0);
$path = ( ($exe));
$java = '/usr/bin/java';
$jarfile_name = "create-app-assembly-1.13.jar";
$app_path_root = '';
foreach ( @ARGV ) {
if ( |=(.*)| && - $1 ) {
$app_path_root = ($1);
last;
}
}
### install path
$distro_jarfile = $jarfile = "$path/java/$jarfile_name";
if ( ! - $jarfile ) {
### development path
$jarfile = "$path/../target/scala-2.12/$jarfile_name";
if ( ! - $jarfile ) {
$jarfile = $distro_jarfile;
### pull from download url
my $jardir = ($jarfile);
$jardir); (
my $ff = ::->new( => 'http://casa.nrao.edu/download/devel/xml-casa/java/' . $jarfile_name);
my $where = $ff-> ( => $jardir );
}
}
die "configuration error, cannot find jar file ($jarfile_name)" unless - $jarfile;
@args = ( ($java), '-jar', $jarfile );
push(@args,@ARGV);
#exec { $java } @args;
$appdir = "";
die "cannot fork: $!" unless defined($pid = open( , "-|"));
if ($pid) { # parent
while (my $line = <>) {
print "$line";
if ( $line =~ |^ \+(.*)$| ) {
$appdir = $1;
}
}
close( ) or warn "kid exited $?";
} else {
# reconfigure, then
exec { $java } @args or die "can't exec program: $!";
}
print(">>>>>>>>> $appdir\n");