update dev300-m58
[ooovba.git] / solenv / bin / createpdbrelocators.pl
blob5f97643f7c4ace0c0c4a3e6f4c51124d8f798e91
2 eval 'exec perl -wS $0 ${1+"$@"}'
3 if 0;
4 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 #
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # $RCSfile: createpdbrelocators.pl,v $
14 # $Revision: 1.5 $
16 # This file is part of OpenOffice.org.
18 # OpenOffice.org is free software: you can redistribute it and/or modify
19 # it under the terms of the GNU Lesser General Public License version 3
20 # only, as published by the Free Software Foundation.
22 # OpenOffice.org is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU Lesser General Public License version 3 for more details
26 # (a copy is included in the LICENSE file that accompanied this code).
28 # You should have received a copy of the GNU Lesser General Public License
29 # version 3 along with OpenOffice.org. If not, see
30 # <http://www.openoffice.org/license.html>
31 # for a copy of the LGPLv3 License.
33 #*************************************************************************
35 #*************************************************************************
37 # createpdbrelocators - create for pdb relocator files
38 # PDB relocator files are used to find debug infos
39 # for analysis of creash reports
41 # usage: createpdbrelocators;
43 #*************************************************************************
45 use strict;
47 #### module lookup
49 use lib ("$ENV{SOLARENV}/bin/modules");
50 use CreatePDBRelocators;
52 #### script id #####
54 ( my $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
56 my $script_rev;
57 my $id_str = ' $Revision: 1.5 $ ';
58 $id_str =~ /Revision:\s+(\S+)\s+\$/
59 ? ($script_rev = $1) : ($script_rev = "-");
61 print "$script_name -- version: $script_rev\n";
63 my $inpath = $ENV{INPATH};
64 my $milestone = $ENV{UPDMINOR};
66 if ( $ARGV[0] ) {
67 if ( $milestone && ( $milestone ne $ARGV[0] ) ) {
68 die "Error: specified milestone $ARGV[0] does not match your environment";
70 $milestone = $ARGV[0];
73 if ( !$inpath || !$milestone ) {
74 print STDERR "$script_name: INAPTH or UPDMINOR not set!\n";
75 exit(1);
78 my $rc = CreatePDBRelocators::create_pdb_relocators($inpath, $milestone, "");
80 if ( !$rc ) {
81 print STDERR "$script_name: creating PDB relocators failed!\n";
82 exit(2);
85 exit(0);