[Bio] / Sprout / FigConfigFix.pl Repository:
ViewVC logotype

Diff of /Sprout/FigConfigFix.pl

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

revision 1.1, Mon Nov 5 21:28:30 2007 UTC revision 1.2, Tue Feb 5 04:59:51 2008 UTC
# Line 65  Line 65 
65    
66  use strict;  use strict;
67  use Tracer;  use Tracer;
 use DocUtils;  
 use TestUtils;  
68  use Cwd;  use Cwd;
69  use File::Copy;  use File::Copy;
70  use File::Path;  use File::Path;
# Line 83  Line 81 
81  my $rtype;  my $rtype;
82  # Insure we catch errors.  # Insure we catch errors.
83  eval {  eval {
84      # We'll use the ModifyConfigFile utility from DocUtils to do the update. We make only one change.      # We'll use the ModifyConfigFile utility from DocUtils to do the update. Note we force
85        # $live_server to 1.
86      my $newValue;      my $newValue;
87        my $changes = { live_server => 1 };
88      if ($parameters[0] eq 'stage') {      if ($parameters[0] eq 'stage') {
89          my $changes = { nmpdr_site_url => "http://www.nmpdr.org/next" };          $changes->{nmpdr_site_url} = "http://www.nmpdr.org/next";
90          Trace("Changing nmpdr site URL for staging version to $changes->{nmpdr_site_url}.") if T(2);          Trace("Changing nmpdr site URL for staging version to $changes->{nmpdr_site_url}.") if T(2);
91          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/next/FIGdisk/config/FIG_Config.pm", $changes, []);          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/next/FIGdisk/config/FIG_Config.pm", $changes, []);
92      } elsif ($parameters[0] eq 'roll') {      } elsif ($parameters[0] eq 'roll') {
93          my $changes = { nmpdr_site_url => "http://www.nmpdr.org" };          $changes->{nmpdr_site_url} = "http://www.nmpdr.org";
94          Trace("Changing nmpdr site URL for new version to $changes->{nmpdr_site_url}.") if T(2);          Trace("Changing nmpdr site URL for new version to $changes->{nmpdr_site_url}.") if T(2);
95          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/next/FIGdisk/config/FIG_Config.pm", $changes, []);          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/next/FIGdisk/config/FIG_Config.pm", $changes, []);
96          $changes->{nmpdr_site_url} = "http://www.nmpdr.org/prev";          $changes->{nmpdr_site_url} = "http://www.nmpdr.org/prev";
97          Trace("Changing nmpdr site URL for old version to $changes->{nmpdr_site_url}.") if T(2);          Trace("Changing nmpdr site URL for old version to $changes->{nmpdr_site_url}.") if T(2);
98          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/cur/FIGdisk/config/FIG_Config.pm", $changes, []);          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/cur/FIGdisk/config/FIG_Config.pm", $changes, []);
99      } elsif ($parameters[0] eq 'fix') {      } elsif ($parameters[0] eq 'fix') {
100          my $changes = { nmpdr_site_url => "http://www.nmpdr.org" };          $changes->{nmpdr_site_url} = "http://www.nmpdr.org";
101          Trace("Changing nmpdr site URL for current version to $changes->{nmpdr_site_url}.") if T(2);          Trace("Changing nmpdr site URL for current version to $changes->{nmpdr_site_url}.") if T(2);
102          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/cur/FIGdisk/config/FIG_Config.pm", $changes, []);          DocUtils::ModifyConfigFile("$FIG_Config::nmpdr_base/cur/FIGdisk/config/FIG_Config.pm", $changes, []);
103      } else {      } else {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3