[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.4 - (view) (download) (as text)

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3