casalogger package for CASA 6
Source
#!/usr/bin/perl
use :: ;
use :: ;
use :: ;
use qw(abs_path getcwd);
use :: qw(make_path remove_tree);
use qw(strftime);
use ;
use :: ;
use :: ;
use :: ;
use qw(abs_path getcwd);
use :: qw(make_path remove_tree);
use qw(strftime);
use ;
if ( - "sakura-source" ) {
exit(0);
} else {
print("configuring casalogger for building...\n");
}
###
### avoid: "Fetch failed! HTTP response: 500 Internal Server Error [500 Can’t verify SSL peers without knowing which Certificate Authorities to trust]"
###
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
###
### avoid: TLSv1.0 backends...
###
$File:::: = [| |];
$exe = ($0);
$path = ( ($exe));
$java = '/usr/bin/java';
$jarfile_name = "create-app-assembly-1.15.jar";
@java_version = ( );
open( , "$java -version 2>&1 |");
foreach ( <> ) {
if ( | "?(\d+)\.(\d+)|i ) {
@java_version = ($1,$2);
print " ", join('.',@java_version), "\";
}
}
close(JAVAVER);
die " $java" unless scalar(@java_version) > 0;
die " 1.8 or \" unless $java_version[0] > 7 || ($java_version[0] == 1 && $java_version[1] >= 8);
### install path
$distro_jarfile = $jarfile = "$path//$jarfile_name";
if ( ! -e $jarfile ) {
### development path
$jarfile = "$path/..//-2.12/$jarfile_name";
if ( ! -e $jarfile ) {
$jarfile = $distro_jarfile;
### pull from download url
my $jardir = dirname($jarfile);
make_path($jardir);
my $ff = File::Fetch->new(uri => " ://..///-//$jarfile_name");
my $where = $ff->fetch( to => $jardir );
}