Changeset 1179


Ignore:
Timestamp:
2000-05-19T17:00:12+12:00 (24 years ago)
Author:
sjboddie
Message:

* empty log message *

Location:
trunk/gsdl/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/filecopy.pl

    r1173 r1179  
    3232    die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
    3333    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
    34 
    35     unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/lib");
    36     $ENV{'PATH'} = "$ENV{'GSDLHOME'}/perllib/cpan/bin:$ENV{'PATH'}";
    3734}
    3835
     
    8380    {
    8481        my $src_file = $f;
    85         my $dst_file = &util::filename_cat($full_importname,$f);
     82        my $dst_file = &get_dst_dir ($full_importname,$f);
    8683
    8784        my $do_copy = "no";
     
    104101        if ($do_copy eq "yes")
    105102        {
    106         print STDOUT "Copying $src_file\n";
     103        print STDOUT "Copying $src_file-->$dst_file\n";
    107104        &util::cp($src_file,$dst_file);
    108105        }
     
    117114    {
    118115        my $src_dir = $d;
    119         my $dst_dir = &util::filename_cat($full_importname,$d);
     116        my $dst_dir = &get_dst_dir ($full_importname, $d);
    120117        if (!-e $dst_dir)
    121118        {
     
    153150}
    154151
     152sub get_dst_dir {
     153    my ($full_importname, $dir) = @_;
     154
     155    if ($ENV{'GSDLOS'} eq "windows") {
     156    # don't want windows filenames like c:\gsdl\...\import\c:\dir
     157    $dir =~ s/^[a-z]:[\\\/]//i;
     158    }
     159    return &util::filename_cat($full_importname,$dir);
     160}
     161
    155162&main();
    156 
    157 
    158 
    159 
Note: See TracChangeset for help on using the changeset viewer.