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

Annotation of /FigCommon/switch_to_release.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : efrank 1.1 #
2 :     # switch_to_release <release_number>
3 :     #
4 :     # Change the currently-running release to <release_number>
5 :     #
6 :     # Check to be sure that $fig_disk/dist/releases/<release_number> exists
7 :     # Update $fig_disk/CURRENT_RELEASE with the new release number.
8 :     # Swing the symlinks $fig_disk/FIG/bin and $fig_disk/FIG/CGI to the right place
9 :     #
10 :    
11 :     if (@ARGV != 1)
12 :     {
13 :     die "Usage: switch_to_release release-number";
14 :     }
15 :    
16 :     my $release_number = $ARGV[0];
17 :    
18 :     my $release_dir = "$FIG_Config::fig_disk/dist/releases/$release_number";
19 :    
20 :     #
21 :     # FIXME
22 :     #
23 :     my $arch = "mac";
24 :    
25 :     if (! -d $release_dir)
26 :     {
27 :     die "Release directory $release_dir does not exist"
28 :     }
29 :    
30 :     #
31 :     # Okay, go for it.
32 :     #
33 :    
34 :     if (!open(FH, ">$FIG_Config::fig_disk/CURRENT_RELEASE"))
35 :     {
36 :     die "Cannot write to $FIG_Config::fig_disk/CURRENT_RELEASE";
37 :     }
38 :     print FH "$release_number\n";
39 :     close(FH);
40 :    
41 :     #
42 :     # Symlinks.
43 :     #
44 :    
45 :     unlink("$FIG_Config::fig_disk/FIG/bin");
46 :     symlink("../dist/releases/$release_number/bin/$arch", "$FIG_Config::fig_disk/FIG/bin");
47 :     unlink("$FIG_Config::fig_disk/FIG/CGI");
48 :     symlink("../dist/releases/$release_number/CGI", "$FIG_Config::fig_disk/FIG/CGI");
49 :    
50 : efrank 1.2 $FIG::run("cd $release_dir; make clean; make");

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3