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

View of /FigCommon/switch_to_release.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Fri Dec 19 17:25:40 2003 UTC (15 years, 11 months ago) by efrank
Branch: MAIN
Switch to release script

#
# switch_to_release <release_number>
#
# Change the currently-running release to <release_number>
#
# Check to be sure that $fig_disk/dist/releases/<release_number> exists
# Update $fig_disk/CURRENT_RELEASE with the new release number.
# Swing the symlinks $fig_disk/FIG/bin and $fig_disk/FIG/CGI to the right place
#

if (@ARGV != 1)
{
    die "Usage: switch_to_release release-number";
}

my $release_number = $ARGV[0];

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);

#
# Symlinks.
#

unlink("$FIG_Config::fig_disk/FIG/bin");
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");


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3