Last change
on this file since 18485 was 1171, checked in by sjboddie, 24 years ago |
more changes to try to get end-user collection building working
under windows
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
911 bytes
|
Line | |
---|
1 | package GSDLHOME;
|
---|
2 |
|
---|
3 | BEGIN {
|
---|
4 |
|
---|
5 | if (!defined $ENV{'GSDLHOME'}) {
|
---|
6 | # read gsdlhome from gsdlsite.cfg
|
---|
7 | open (GSDLSITE, "gsdlsite.cfg") || die
|
---|
8 | "GSDLHOME.pm: unable to open gsdlsite.cfg\n";
|
---|
9 | my $line = "";
|
---|
10 | while (defined ($line = <GSDLSITE>)) {
|
---|
11 | if ($line =~ /^gsdlhome\s+(.*?)\s*$/) {
|
---|
12 | $ENV{'GSDLHOME'} = $1;
|
---|
13 | last;
|
---|
14 | }
|
---|
15 | }
|
---|
16 | die "GSDLHOME.pm: couldn't find gsdlhome field in gsdlsite.cfg\n"
|
---|
17 | unless defined $ENV{'GSDLHOME'};
|
---|
18 | }
|
---|
19 |
|
---|
20 | # just in case GSDLHOME has a slash on the end which would cause
|
---|
21 | # double slashes below
|
---|
22 | $ENV{'GSDLHOME'} =~ s/[\/\\]+$//;
|
---|
23 |
|
---|
24 | $ENV{'GSDLOS'} = $^O;
|
---|
25 |
|
---|
26 | if ($ENV{'GSDLOS'} =~ /(win|dos)/i) {
|
---|
27 | $ENV{'GSDLOS'} = 'windows';
|
---|
28 | }
|
---|
29 |
|
---|
30 | $ENV{'PATH'} .= ":$ENV{'GSDLHOME'}/bin/script";
|
---|
31 | $ENV{'PATH'} .= ":$ENV{'GSDLHOME'}/bin/$ENV{'GSDLOS'}";
|
---|
32 | unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
|
---|
33 | unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
|
---|
34 | }
|
---|
35 |
|
---|
36 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.