#!/usr/bin/perl

#
# PROJECT
#          Hinode/EIS
# PURPOSE
#          Perl script, which runs on the SSH2@ISAS machine, that
#          calls the eis_eisco_update_cp_info.pl script (via ssh) on the
#          EISCO machine.
# CATEGORY
#          EIS Timeline Planning/Remote Planning
# WRITTEN
#          John Rainnie & David Brooks & David Williams
# HISTORY
#          v0.1 JAR/DHB/DRW 28-Oct-2008
#

use Env qw(HOME);

print "++++++++++++++++++++++++++++++++++++++++++++++++\n";
print "Starting eis_ssh2_update_cp_info.pl script on SSH2\@ISAS\n";
print "\n";
print "    Remote planner is SSH2\n";

$archive = "$HOME/eis_rp_archive.tar.gz";

# Delete tarball "eis_rp_archive.tar.gz" if it already exists!
system("/bin/rm $archive") if -e $archive;

print "    Logging into EISCO and running the archive script...\n";
system("ssh eisco\@eisco eis_eisco_update_cp_info.pl");

print "\n";
print "Finished eis_ssh2_update_cp_info.pl script on SSH2\@ISAS\n";
print "++++++++++++++++++++++++++++++++++++++++++++++++\n";

