[Bio] / FigCommon / bootstrap.pl Repository:
ViewVC logotype

Diff of /FigCommon/bootstrap.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Thu Jun 3 18:25:21 2004 UTC revision 1.22, Wed May 4 21:42:50 2005 UTC
# Line 131  Line 131 
131    
132      my $fig = "$fig_disk/FIG";      my $fig = "$fig_disk/FIG";
133      my $data = "$fig/Data";      my $data = "$fig/Data";
134        my $sproutData = "$fig/SproutData";
135    
136      my $hostname = `hostname`;      my $hostname = `hostname`;
137      chomp $hostname;      chomp $hostname;
# Line 140  Line 141 
141      push(@$Config, ["fig", $fig, 1]);      push(@$Config, ["fig", $fig, 1]);
142      push(@$Config, ["bin", $fig_bin, 1]);      push(@$Config, ["bin", $fig_bin, 1]);
143      push(@$Config, ["ext_bin", $env_bin, 1]);      push(@$Config, ["ext_bin", $env_bin, 1]);
144        push(@$Config, ["common_runtime", $env_dir, 1]);
145        push(@$Config, ["arch", $ENV{FIGCONFIG_ENV}, 1]);
146        push(@$Config, ["var", "$fig/var", 1]);
147      push(@$Config, ["data", $data, 1]);      push(@$Config, ["data", $data, 1]);
148      push(@$Config, ["global", "$data/Global", 1]);      push(@$Config, ["global", "$data/Global", 1]);
149      push(@$Config, ["organisms", "$data/Organisms", 1]);      push(@$Config, ["organisms", "$data/Organisms", 1]);
150      push(@$Config, ["RC", "$fig_disk/FIG/ResolutionCenter", 1]);      push(@$Config, ["RC", "$fig_disk/FIG/ResolutionCenter", 1]);
151      push(@$Config, ["NR", "$fig_disk/FIG/NR", 1]);      push(@$Config, ["NR", "$fig_disk/FIG/NR", 1]);
152      push(@$Config, ["temp", "$fig_disk/FIG/Tmp", 1]);      push(@$Config, ["temp", "$fig_disk/FIG/Tmp", 1]);
153        push(@$Config, ["sproutData", $sproutData, 1]);
154    
155      my $sandbox;      my $sandbox;
156      if ($ENV{FIGCONFIG_SANDBOX})      if ($ENV{FIGCONFIG_SANDBOX})
# Line 196  Line 201 
201    
202      push(@$Env, ["LD_LIBRARY_PATH", "${env_lib}", 1]);      push(@$Env, ["LD_LIBRARY_PATH", "${env_lib}", 1]);
203    
204      push(@$Env, ["PERL5LIB", join(":", grep({ $_ ne "." } @INC)), 1]);      my @perllib = grep({ $_ ne "." } @INC, "$fig_disk/config", $release_lib,
205                          "$release_lib/FigKernelPackages");
206    
207        push(@$Env, ["PERL5LIB", join(":", @perllib), 1]);
208  }  }
209    
210  sub configure_python  sub configure_python
# Line 284  Line 292 
292      $python = "$ENV{FIGCONFIG_ENV_DIR}/bin/python";      $python = "$ENV{FIGCONFIG_ENV_DIR}/bin/python";
293      if (-x $python)      if (-x $python)
294      {      {
295            #
296            # The mac doesn't seem to like the long #! lines, so we'll use poundbang env.
297            #
298            if ($ENV{FIGCONFIG_ENV} =~ /^mac/)
299            {
300                $OtherConfig->{python_require_poundbang_env} = 1;
301            }
302          return $python;          return $python;
303      }      }
304    
# Line 336  Line 351 
351              print $fh "export $name\n";              print $fh "export $name\n";
352          }          }
353      }      }
354        print $fh "alias rtpath='source \$RTDIST/releases/\$RTCURRENT/ReleaseTools/RTPath.sh'\n";
355  }  }
356    
357  sub write_csh_init  sub write_csh_init
# Line 366  Line 382 
382          }          }
383      }      }
384    
385        #
386        # Alias for RT stuff.
387        #
388        print $fh "alias rtpath 'source \$RTDIST/releases/\$RTCURRENT/ReleaseTools/RTPath.csh'\n";
389  }  }
390    
391  sub run_script  sub run_script
# Line 574  Line 594 
594      # Append the perl path to the environment, for use later with CallPerl.      # Append the perl path to the environment, for use later with CallPerl.
595      #      #
596    
597      my $perlpath = join(":", @INC, "$fig_disk/config");      my $perlpath = join(":", @INC, "$fig_disk/config", $release_lib, "$release_lib/FigKernelPackages");
598      print $fh <<END;      print $fh <<END;
599  if os.getenv("PERL5LIB", "") != "":  if os.getenv("PERL5LIB", "") != "":
600      _delim = ":"      _delim = ":"
# Line 609  Line 629 
629  configure_std_fig_environment();  configure_std_fig_environment();
630  configure_python();  configure_python();
631  configure_environment_specific();  configure_environment_specific();
632    # configure_database();
633    
634  finalize_server_scripts();  finalize_server_scripts();
635    
# Line 651  Line 672 
672    
673  require FigCommon::SwitchRelease;  require FigCommon::SwitchRelease;
674    
675    #
676    # We need to tweak the current path and PERL5LIB environment to get bootstrapping to
677    # work correctly.
678    #
679    
680    $ENV{PATH} = "$ENV{FIGCONFIG_ENVDIR}/bin:$ENV{PATH}";
681    
682    $ENV{PERL5LIB} = (map { $_->[1] } grep { $_->[0] eq "PERL5LIB"} @$Env)[0];
683    
684  &FigCommon::SwitchRelease::switch_to_release($fig_disk, $ENV{FIGCONFIG_ENV}, $ENV{FIGCONFIG_RELEASE});  &FigCommon::SwitchRelease::switch_to_release($fig_disk, $ENV{FIGCONFIG_ENV}, $ENV{FIGCONFIG_RELEASE});

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.22

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3