repository for casatablebrowser
Source
xxxxxxxxxx
#!/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 casatablebrowser 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.12.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 );
}
}
die " , ($jarfile_name)" unless -e $jarfile;
if ( $Config{osname} eq "" && ! -e "." ) {
my $ff = File::Fetch->new(uri => " ://..///-//.");
$ff->fetch( );
}
open(VER," -/ && //. ---print 2>&1 |");
$major_ver = '';
$minor_ver = '';
$patch_ver = '';
$build_ver = '';
@lines = <VER>;
foreach ( @lines ) {
if ( m|^(\d+)\.(\d+)\.(\d+)[^0-9]+(\d+)\+?$| ) {
$major_ver = $1;
$minor_ver = $2;
$patch_ver = $3;
$build_ver = $4;
break;
}
}
close(VER);
unless ( $major_ver ne '' && $minor_ver ne '' && $patch_ver ne '' && $build_ver ne '' ) {
print " . :\";
foreach ( @lines ) { print " $_"; }
die " continue...";