source: devel/pb/lib/toolhome.pm @ 5

Last change on this file since 5 was 5, checked in by bruno, 12 years ago

Lots of modifs to find the right way. Probably still not good

  • Property svn:executable set to *
File size: 448 bytes
Line 
1#!/usr/bin/perl -w
2#
3# Module to compute PBROOT and put in the environment
4#
5# $Id$
6#
7require Exporter;
8@ISA = qw(Exporter);
9@EXPORT = qw(set_toolhome);
10
11use strict;
12use File::Basename;
13
14sub set_toolhome {
15
16my $tmp = dirname($PROGRAM_NAME);
17#print "$tmp\n";
18if ($tmp =~ /^\//) {
19        $ENV{'PBROOT'} = $tmp;
20        }
21else {
22        $ENV{'PBROOT'} = "$ENV{PWD}/$tmp";
23        }
24
25die "PBROOT doesn't exist" if (not (defined $ENV{'PBROOT'}));
26}
271;
Note: See TracBrowser for help on using the repository browser.