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"
31 BLERG_PATH="\$BLERG_HOME/data"
36 # nginx FastCGI params
37 open C, '>', "$ENV_DIR/etc/nginx-fastcgi-vars.conf";
39 fastcgi_param BLERG_HOME "$ENV_DIR";
40 fastcgi_param BLERG_PATH "$ENV_DIR/data";
41 fastcgi_param PERL5LIB "$ENV_DIR/lib/perl5";
46 open C, '>', "$ENV_DIR/etc/apache-setenv.conf";
48 SetEnv BLERG_HOME "$ENV_DIR"
49 SetEnv BLERG_PATH "$ENV_DIR/data"
50 SetEnv PERL5LIB "$ENV_DIR/lib/perl5"