root/branches/newmole/scripts/promote_beta.pl

Revision 13, 2.4 kB (checked in by gary, 3 years ago)

adjust file properties for ascii and perl files - no source change

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!perl -w
2# in above -w turns on some warnings
3
4# perl script to back up the cloudy source files onto a different computer
5# this is automatically executed once per week, early Saturday morning
6# files go to cdrw_dir which should be an accessible cdrw drive,
7# and also to out_dir
8
9# bring in the perl module that includes copy
10use File::Copy;
11
12# the disk drive where the original files and results live, we will back this up
13$c = "u";
14# last and beta directories
15$last_dir = "$c:/pub/gary/bleeding_edge/last/";
16# last and beta directories
17$beta_dir = "$c:/pub/gary/bleeding_edge/beta/";
18
19# get current time and date
20($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
21                                            gmtime(time);
22# convert to proper year
23$year = sprintf("%02d", $year % 100);
24# convert to proper month
25# this gives the month in two digits
26$month = sprintf("%02d", $mon+1);
27
28# create basename for file
29$basename = "$year"."$month"."$mday" ;
30
31# move to the last directory, which contains source.tar etc
32chdir( $last_dir ) or die " invalid directory for output of test suite\n";
33
34# create fully resolved names for where the files will end up
35$data_tar = "$beta_dir"."$basename"."_data.tar.gz" ;
36$data_zip = "$beta_dir"."$basename"."_data.zip" ;
37
38$source_tar = "$beta_dir"."$basename"."_source.tar.gz";
39$source_zip = "$beta_dir"."$basename"."_source.zip";
40
41$tsuite_tar = "$beta_dir"."$basename"."_tsuite.tar.gz";
42$tsuite_zip = "$beta_dir"."$basename"."_tsuite.zip";
43
44# these files live in tsuite/auto and were created by
45# last night's run of current\unix\copy_files.pl
46if( !copy( "data.tar.gz" , $data_tar ) )
47{
48   printf(" could not copy data tar\n");
49   send_mail_fail();
50   exit(1);
51}
52if( !copy( "data.zip" , $data_zip ) )
53{
54   printf(" could not copy data zip\n");
55   send_mail_fail();
56   exit(1);
57}
58printf(" copied data tar and zip\n");
59
60if( !copy( "source.tar.gz" , $source_tar ) )
61{
62   printf(" could not copy source tar\n");
63   send_mail_fail();
64   exit(1);
65}
66if( !copy( "source.zip" , $source_zip ) )
67{
68   printf(" could not copy source zip\n");
69   send_mail_fail();
70   exit(1);
71}
72printf(" copied source tar and zip\n");
73
74if( !copy( "tsuite.tar.gz" , $tsuite_tar ) )
75{
76   printf(" could not copy tsuite tar\n");
77   send_mail_fail();
78   exit(1);
79}
80if( !copy( "tsuite.zip" , $tsuite_zip ) )
81{
82   printf(" could not copy tsuite zip\n");
83   send_mail_fail();
84   exit(1);
85}
86printf(" copied tsuite tar and zip\n");
87
88
Note: See TracBrowser for help on using the browser.