blob: d59772296052ab1c1ac44fc30e27e370c6a15662 [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001#!/usr/local/bin/perl
2#$file = $ARGV[0];
3#$FIXPATH = $ARGV[1];
4#$RELEASE_DIR = $ARGV[2];
5$FIXPATH = $ARGV[0];
6print "$FIXPATH\n";
7
8$RELEASE_DIR = $ARGV[1];
9print "$RELEASE_DIR\n";
10shift(@ARGV);
11shift(@ARGV);
12@Files="@ARGV";
13
14open(F,">$FIXPATH\\make\\~copy.tmp") or die "Cannot open $FIXPATH\\make\\~copy.tmp";
15print F @Files;
16close(F);
17
18print "perl pcore\\tools\\lnitem.pl $FIXPATH\\make\\~copy.tmp";
19system("perl pcore\\tools\\lnitem.pl $FIXPATH\\make\\~copy.tmp");
20
21open(F,"<$FIXPATH\\make\\~copy.tmp") or die "Cannot open $file: $!";
22while(<F>) {
23 chomp($_);
24 if (-e $_) {
25 if(!-e "$RELEASE_DIR\\$_") {
26 system("md $RELEASE_DIR\\$_");
27 system("rd $RELEASE_DIR\\$_");
28 }
29 print "copy /y $FIXPATH\\$_ $RELEASE_DIR\\$_\n";
30 system("copy /y $FIXPATH\\$_ $RELEASE_DIR\\$_");
31 } else {
32 chop($_);
33 if(!-e "$RELEASE_DIR\\$_") {
34 system("md $RELEASE_DIR\\$_");
35 system("rd $RELEASE_DIR\\$_");
36 }
37 print "copy /y $FIXPATH\\$_ $RELEASE_DIR\\$_\n";
38 system("copy /y $FIXPATH\\$_ $RELEASE_DIR\\$_");
39 }
40}
41close(F);