Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 47 lines (36 sloc) 0.957 kb
4bdee89 @abh configurable perl and httpd location
authored
1 #!/bin/sh
2 if [ -z $CBROOT ]; then
86eca59 @abh exit with 255 when CBROOT isn't set (or the configuration file can't be ...
authored
3 echo CBROOT environment variable not set 1>&2
371e525 @abh exit with "2" ("incorrect usage")
authored
4 exit 2
4bdee89 @abh configurable perl and httpd location
authored
5 fi
6
47c07b9 @abh make httpd.tmpl only pick up local.tmpl if it actually exists
authored
7 # funny bash syntax for setting ROOT to one or the other if the one isn't set
8 ROOT=${CBROOTLOCAL:-$CBROOT}
9
967dd69 @abh r2578@embla: ask | 2006-03-27 20:45:43 -0800
authored
10 CONFIGFILE=${CBCONFIG:-$ROOT/combust.conf}
11
27690d9 Support for local cpan directory
Graham Barr authored
12
967dd69 @abh r2578@embla: ask | 2006-03-27 20:45:43 -0800
authored
13 if [ ! -f $CONFIGFILE ]; then
86eca59 @abh exit with 255 when CBROOT isn't set (or the configuration file can't be ...
authored
14 echo Could not find configuration file $CONFIGFILE 1>&2
371e525 @abh exit with "2" ("incorrect usage")
authored
15 exit 2
4bdee89 @abh configurable perl and httpd location
authored
16 fi
17
27690d9 Support for local cpan directory
Graham Barr authored
18 MYPERL=`awk '/^ *perl *=/ { print $3 }' $CONFIGFILE`
4bdee89 @abh configurable perl and httpd location
authored
19
20 if [ -z $MYPERL ]; then
abfac10 @abh Just use perl in path when not specified in combust.conf
authored
21 MYPERL=perl
4bdee89 @abh configurable perl and httpd location
authored
22 fi
23
27690d9 Support for local cpan directory
Graham Barr authored
24 mylib=$CBROOT/lib
25 if [ ! -z "$CBROOTLOCAL" ]; then
26 if [ -d $CBROOTLOCAL/lib ]; then
27 mylib=$CBROOTLOCAL/lib:$mylib
28 fi
29 if [ -d $CBROOTLOCAL/cpan/lib/perl5 ]; then
30 mylib=$mylib:$CBROOTLOCAL/cpan/lib/perl5
31 fi
8521815 @abh r1106@embla: ask | 2006-03-05 17:45:03 -0800
authored
32 fi
33
27690d9 Support for local cpan directory
Graham Barr authored
34 if [ -d $CBROOT/cpan/lib/perl5 ]; then
35 mylib=$mylib:$CBROOT/cpan/lib/perl5
36 fi
4bdee89 @abh configurable perl and httpd location
authored
37
27690d9 Support for local cpan directory
Graham Barr authored
38 if [ -z "$PERL5LIB" ] ; then
39 PERL5LIB=$mylib
40 else
41 # perhaps we should just replace it to prevent it growing from recursive calls
42 PERL5LIB=$mylib:$PERL5LIB
43 fi
44 export PERL5LIB
4bdee89 @abh configurable perl and httpd location
authored
45
27690d9 Support for local cpan directory
Graham Barr authored
46 exec $MYPERL ${1+"$@"}
Something went wrong with that request. Please try again.