-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_cb.pl
47 lines (41 loc) · 925 Bytes
/
start_cb.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! perl
$tar = "bin\\tar.exe";
$rm = "bin\\rm.exe";
$cp = "bin\\cp.exe";
if( !$ARGV[0]){
print "need cr.tar\n";
exit 1;
}
$cr = $ARGV[0];
$ex = $cr . "_";
$cmd = "$rm -rf $ex";
mkdir $ex;
$cmd = "cp -f $cr $ex";
system ($cmd);
$cmd = $tar . " xvf $ex/" . $cr . " -C $ex";
system ($cmd);
$cmd = $tar . " -tf $ex/$cr > $ex/$cr.lst";
print $cmd, "\n";
system ($cmd);
open H, "$ex/$cr.lst";
@fs = <H>;
close H;
foreach $f (@fs){
chomp $f;
$_ = $f;
if( /.map$/){
# print $f, "\n";
# $cmd = "perl cb.pl -2.9 -22.1 \"" . $ex . "/" . $f . "\"";
$cmd = "perl cb.pl -3.78 -22 \"" . $ex . "/" . $f . "\"";
print $cmd, "\n";
system($cmd);
}
}
system("rm -f $ex/$cr.lst $ex/$cr ");
chdir $ex;
system("tar cvf $cr .");
chdir "..";
system("mv $ex/$cr $cr.new");
system("rm -rf $ex");
system("tar --delete . -f $cr.new");
system("tar --delete $cr -f $cr.new");