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

Diff of /FigCommon/switch_to_release.pl

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

revision 1.3, Fri Dec 19 20:04:03 2003 UTC revision 1.9, Tue May 17 16:22:03 2005 UTC
# Line 1  Line 1 
1    
2    use FIG;
3    
4  #  #
5  # switch_to_release <release_number>  # switch_to_release <release_number>
6  #  #
7  # Change the currently-running release to <release_number>  # Change the currently-running release to <release_number>
8  #  #
9  # Check to be sure that $fig_disk/dist/releases/<release_number> exists  # Check to be sure that $fig_disk/dist/releases/<release_number> exists
10    #
11  # Update $fig_disk/CURRENT_RELEASE with the new release number.  # Update $fig_disk/CURRENT_RELEASE with the new release number.
12    #
13  # Swing the symlinks $fig_disk/FIG/bin and $fig_disk/FIG/CGI to the right place  # Swing the symlinks $fig_disk/FIG/bin and $fig_disk/FIG/CGI to the right place
14  #  #
15    # Create the symlink $fig_disk/dist/releases/current to point to <release_number>
16    #
17    # Create a symlink $fig_disk/dist/releases/last to point to the pre-switch release.
18    #
19    # Expand the environment-specific tool headers from $fig_disk/config/base_tool_hdr
20    # to include the release-specific directories. Place the output in
21    # dist/releases/<release_number>/<arch>.
22    #
23    
24    require FigCommon::SwitchRelease;
25    
26  if (@ARGV != 1)  if (@ARGV != 1)
27  {  {
# Line 15  Line 30 
30    
31  my $release_number = $ARGV[0];  my $release_number = $ARGV[0];
32    
 my $release_dir = "$FIG_Config::fig_disk/dist/releases/$release_number";  
   
 #  
 # FIXME  
 #  
 my $arch = "mac";  
   
 if (! -d $release_dir)  
 {  
     die "Release directory $release_dir does not exist"  
 }  
   
 #  
 # Okay, go for it.  
 #  
   
 if (!open(FH, ">$FIG_Config::fig_disk/CURRENT_RELEASE"))  
 {  
     die "Cannot write to $FIG_Config::fig_disk/CURRENT_RELEASE";  
 }  
 print FH "$release_number\n";  
 close(FH);  
   
33  #  #
34  # Symlinks.  # We assume the architecture name is keept in $RTARCH in the environment.
35  #  #
36    my $arch = $ENV{RTARCH};
37    
38  unlink("$FIG_Config::fig_disk/FIG/bin");  FigCommon::SwitchRelease::switch_to_release($FIG_Config::fig_disk, $arch, $release_number);
 symlink("../dist/releases/$release_number/bin/$arch", "$FIG_Config::fig_disk/FIG/bin");  
 unlink("$FIG_Config::fig_disk/FIG/CGI");  
 symlink("../dist/releases/$release_number/CGI", "$FIG_Config::fig_disk/FIG/CGI");  
39    
 &FIG::run("cd $release_dir; make clean; make");  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3