Ignore:
Timestamp:
2010-03-16T17:30:00+13:00 (14 years ago)
Author:
oranfry
Message:

made the snapshot task work in windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/snapshot/trunk/task.pl

    r21797 r21798  
    11use File::Basename;
     2my $sep = $^O eq "MSWin32" ? "\\" : "/";
    23do "$ENV{'TASK_HOME'}/lib.pl";
    34
     
    2627#default data dir
    2728if ( ! exists $ENV{'DATA_DIR'} ) {
    28     $ENV{'DATA_DIR'} = "$ENV{'HOME'}/snapshots";
     29    $ENV{'DATA_DIR'} = "$ENV{'HOME'}${sep}snapshots";
    2930}
    3031
    3132#default identity dir
    3233if ( ! exists $ENV{'IDENTITY_DIR'} ) {
    33     $ENV{'IDENTITY_DIR'} = "$ENV{'HOME'}/.ssh";
     34    $ENV{'IDENTITY_DIR'} = "$ENV{'HOME'}${sep}.ssh";
    3435}
    3536
     
    121122#use the  correct key for uploading
    122123$ENV{'IDENTITY_FILE'} =
    123     "$ENV{'IDENTITY_DIR'}/upload-" . $ENV{'SNAPSHOT_MODE'} . ($^O eq "MSWin32" ? ".ppk" : "");
     124    "$ENV{'IDENTITY_DIR'}${sep}upload-" . $ENV{'SNAPSHOT_MODE'} . ($^O eq "MSWin32" ? ".ppk" : "");
    124125
    125126
     
    137138
    138139#set a release directory
    139 $release_dir = "$ENV{'DATA_DIR'}/$ENV{'TASK_NAME'}/from-" . get_date();
     140$release_dir = "$ENV{'DATA_DIR'}${sep}$ENV{'TASK_NAME'}${sep}from-" . get_date();
    140141
    141142print "creating a snapshot release\n";
Note: See TracChangeset for help on using the changeset viewer.