6 if (!defined $ENV_DIR) {
7 die "Please specify an environment directory to write configs into\n";
9 $ENV_DIR = abs_path($ENV_DIR);
12 open C, '>', "$ENV_DIR/etc/env.sh";
14 if [ -z "\$PATH" ]; then
17 PATH="\$PATH:$ENV_DIR/bin"
21 if [ -z "\$PERL5LIB" ]; then
22 PERL5LIB="$ENV_DIR/lib/perl5"
24 PERL5LIB="\$PERL5LIB:$ENV_DIR/lib/perl5"
28 BLERG_PATH="$ENV_DIR/data"
33 # nginx FastCGI params
34 open C, '>', "$ENV_DIR/etc/nginx-fastcgi-vars.conf";
36 fastcgi_param BLERG_PATH "$ENV_DIR/data";
37 fastcgi_param PERL5LIB "$ENV_DIR/lib/perl5";
42 open C, '>', "$ENV_DIR/etc/apache-setenv.conf";
44 SetEnv BLERG_PATH "$ENV_DIR/data"
45 SetEnv PERL5LIB "$ENV_DIR/lib/perl5"