xref: /trunk/main/solenv/bin/getrevision.pl (revision a8d3c348)
1*a8d3c348SJürgen Schmidt#**************************************************************
2*a8d3c348SJürgen Schmidt#
3*a8d3c348SJürgen Schmidt#  Licensed to the Apache Software Foundation (ASF) under one
4*a8d3c348SJürgen Schmidt#  or more contributor license agreements.  See the NOTICE file
5*a8d3c348SJürgen Schmidt#  distributed with this work for additional information
6*a8d3c348SJürgen Schmidt#  regarding copyright ownership.  The ASF licenses this file
7*a8d3c348SJürgen Schmidt#  to you under the Apache License, Version 2.0 (the
8*a8d3c348SJürgen Schmidt#  "License"); you may not use this file except in compliance
9*a8d3c348SJürgen Schmidt#  with the License.  You may obtain a copy of the License at
10*a8d3c348SJürgen Schmidt#
11*a8d3c348SJürgen Schmidt#    http://www.apache.org/licenses/LICENSE-2.0
12*a8d3c348SJürgen Schmidt#
13*a8d3c348SJürgen Schmidt#  Unless required by applicable law or agreed to in writing,
14*a8d3c348SJürgen Schmidt#  software distributed under the License is distributed on an
15*a8d3c348SJürgen Schmidt#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*a8d3c348SJürgen Schmidt#  KIND, either express or implied.  See the License for the
17*a8d3c348SJürgen Schmidt#  specific language governing permissions and limitations
18*a8d3c348SJürgen Schmidt#  under the License.
19*a8d3c348SJürgen Schmidt#
20*a8d3c348SJürgen Schmidt#**************************************************************
21*a8d3c348SJürgen Schmidt
22*a8d3c348SJürgen Schmidt#### module lookup
23*a8d3c348SJürgen Schmidtuse File::Basename;
24*a8d3c348SJürgen Schmidt
25*a8d3c348SJürgen Schmidtmy @lib_dirs;
26*a8d3c348SJürgen SchmidtBEGIN {
27*a8d3c348SJürgen Schmidt    if ( !defined($ENV{SOLARENV}) ) {
28*a8d3c348SJürgen Schmidt        die "No environment found (environment variable SOLARENV is undefined)";
29*a8d3c348SJürgen Schmidt    }
30*a8d3c348SJürgen Schmidt    push(@lib_dirs, "$ENV{SOLARENV}/bin/modules");
31*a8d3c348SJürgen Schmidt}
32*a8d3c348SJürgen Schmidtuse lib (@lib_dirs);
33*a8d3c348SJürgen Schmidt
34*a8d3c348SJürgen Schmidtuse SvnRevision;
35*a8d3c348SJürgen Schmidt
36*a8d3c348SJürgen Schmidtmy $scm_root_dir=dirname($ENV{SRC_ROOT});
37*a8d3c348SJürgen Schmidt
38*a8d3c348SJürgen Schmidtprint SvnRevision::DetectRevisionId("$scm_root_dir");
39