Last change
on this file since 9 was 5, checked in by Bruno Cornec, 17 years ago |
Lots of modifs to find the right way. Probably still not good
|
-
Property svn:executable
set to
*
|
File size:
448 bytes
|
Rev | Line | |
---|
[2] | 1 | #!/usr/bin/perl -w
|
---|
| 2 | #
|
---|
[5] | 3 | # Module to compute PBROOT and put in the environment
|
---|
[2] | 4 | #
|
---|
| 5 | # $Id$
|
---|
| 6 | #
|
---|
| 7 | require Exporter;
|
---|
| 8 | @ISA = qw(Exporter);
|
---|
| 9 | @EXPORT = qw(set_toolhome);
|
---|
| 10 |
|
---|
| 11 | use strict;
|
---|
| 12 | use File::Basename;
|
---|
| 13 |
|
---|
| 14 | sub set_toolhome {
|
---|
| 15 |
|
---|
| 16 | my $tmp = dirname($PROGRAM_NAME);
|
---|
| 17 | #print "$tmp\n";
|
---|
| 18 | if ($tmp =~ /^\//) {
|
---|
[5] | 19 | $ENV{'PBROOT'} = $tmp;
|
---|
[2] | 20 | }
|
---|
| 21 | else {
|
---|
[5] | 22 | $ENV{'PBROOT'} = "$ENV{PWD}/$tmp";
|
---|
[2] | 23 | }
|
---|
| 24 |
|
---|
[5] | 25 | die "PBROOT doesn't exist" if (not (defined $ENV{'PBROOT'}));
|
---|
[2] | 26 | }
|
---|
| 27 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.