summaryrefslogtreecommitdiff
path: root/src/dlls/mscordac/update.pl
blob: 353e1a177d8720200a289d4fcf235b1df0b84c18 (plain)
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
#!perl -w

#
# Renames the DAC to a long name form that windbg looks for
#

my $sSrcFile = shift or &Usage();
my $sDestName = shift or &Usage();
my $sHostMach = shift or &Usage();
my $sTargMach = shift or &Usage();
my $sVersion = shift or &Usage();
my $sDestDir = shift or &Usage();

my $sName = "$sDestDir\\${sDestName}_${sHostMach}_${sTargMach}_" .
            "$sVersion";

if ($ENV{'_BuildType'} eq "dbg" ||
    $ENV{'_BuildType'} eq "chk") {
    $sName .= "." . $ENV{'_BuildType'};
}

$sName .= ".dll";

if (system("copy $sSrcFile $sName") / 256) {
    die("$0: Unable to copy $sSrcFile to $sName\n");
}

exit 0;

sub Usage
{
    die("usage: $0 <srcfile> <destname> <hostmach> <targmach> " .
        "<version> <destdir> <applycommand>\n");
}