Commits
Ville Suoranta authored 26bc29e6af1 Merge
1 + | #!/usr/bin/perl |
2 + | use :: ; |
3 + | use 'abs_path'; |
4 + | use :: ; |
5 + | use :: ; |
6 + | |
7 + | $0) =~ |^(.*/ ).*|; | (
8 + | unless( $1 ) { die "could not find application contents" } |
9 + | $prefix = $1; |
10 + | |
11 + | chdir( "$prefix/Resources/" ) or die "data resources missing"; |
12 + | |
13 + | if ( - "pipeline" or - "pipeline" ) { |
14 + | chomp($date_string = `date "+%Y%m%d-%H%M%S"`); |
15 + | "pipeline","pipeline.$date_string"); | (
16 + | } |
17 + | |
18 + | open( , "rsync -avz --copy-links rsync://casa-rsync.nrao.edu/casa-pipeline/current/ pipeline 2>&1 |" ) or die $!; |
19 + | |
20 + | @output = ( ); |
21 + | $limit = 3; |
22 + | $msg = '...'; |
23 + | foreach ( <> ) { |
24 + | if ( scalar(@output) < $limit ) { |
25 + | if ( $verbose ) { print "\t$_" } |
26 + | } |
27 + | push( @output, $_ ); |
28 + | if ( scalar(@output) > $limit ) { |
29 + | shift(@output); |
30 + | } |
31 + | } |
32 + | close( ); |
33 + | if ( scalar(@output) > 0 ) { print "\t$msg\n" } |
34 + | foreach ( @output ) { |
35 + | print "\t$_"; |
36 + | } |