1:
2eval 'exec perl -wS $0 ${1+"$@"}'
3    if 0;
4#**************************************************************
5#
6#  Licensed to the Apache Software Foundation (ASF) under one
7#  or more contributor license agreements.  See the NOTICE file
8#  distributed with this work for additional information
9#  regarding copyright ownership.  The ASF licenses this file
10#  to you under the Apache License, Version 2.0 (the
11#  "License"); you may not use this file except in compliance
12#  with the License.  You may obtain a copy of the License at
13#
14#    http://www.apache.org/licenses/LICENSE-2.0
15#
16#  Unless required by applicable law or agreed to in writing,
17#  software distributed under the License is distributed on an
18#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19#  KIND, either express or implied.  See the License for the
20#  specific language governing permissions and limitations
21#  under the License.
22#
23#**************************************************************
24
25
26
27#*************************************************************************
28#
29# createpdbrelocators - create for pdb relocator files
30#                       PDB relocator files are used to find debug infos
31#                       for analysis of creash reports
32#
33# usage: createpdbrelocators;
34#
35#*************************************************************************
36
37use strict;
38
39#### module lookup
40
41use lib ("$ENV{SOLARENV}/bin/modules");
42use CreatePDBRelocators;
43
44#### script id #####
45
46( my $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
47
48my $script_rev;
49my $id_str = ' $Revision: 1.5 $ ';
50$id_str =~ /Revision:\s+(\S+)\s+\$/
51  ? ($script_rev = $1) : ($script_rev = "-");
52
53print "$script_name -- version: $script_rev\n";
54
55my $inpath    = $ENV{INPATH};
56my $milestone = $ENV{UPDMINOR};
57my $milestoneext = $ENV{UPDMINOREXT};
58
59if ( $ARGV[0] ) {
60    if ( $milestone && ( $milestone ne $ARGV[0] ) ) {
61        die "Error: specified milestone $ARGV[0] does not match your environment";
62    }
63    $milestone = $ARGV[0];
64}
65
66if ( !$inpath || !$milestone ) {
67    print STDERR "$script_name: INAPTH or UPDMINOR not set!\n";
68    exit(1);
69}
70my $relocators = CreatePDBRelocators->new();
71my $rc = $relocators->create_pdb_relocators($inpath, $milestoneext, "");
72
73if ( !$rc ) {
74    print STDERR "$script_name: creating PDB relocators failed!\n";
75    exit(2);
76}
77
78exit(0);
79