casalogger package for CASA 6
Source
xxxxxxxxxx
#!/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.15.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: $!";
}
if ( $appdir ) {
=> sub { if ( - $_ && -x $_ ) { system("strip --verbose --strip-unneeded $_") } }}, "$appdir/usr/bin" ); ( {
if ( - $app_path_root ) {
my $set_perm = sub {
if ( - $_ || - $_ ) {
## sometimes perl is a pain
my $mode = (stat($_))[2];
my $user_mode = $mode & 0700;
my $user_minus_write = $user_mode & ~0222;
my $new_mode = $user_mode | ($user_minus_write >> 3) | ($user_minus_write >> 6);
chmod( $new_mode, $_ );
}
};
print( "setting permissions in $app_path_root\n" );
( { => $set_perm }, $app_path_root );
}
##
## create linux application...
##
if ( $Config{osname} eq "linux" ) {
$appimage_creator_name = "appimagetool-x86_64.AppImage";
$appimage_creator = "$path/linux/$appimage_creator_name";
if ( ! - $appimage_creator ) {
### pull from download url