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