Add a counter to the upgrade script, so you know how many configs there are
to do, and how many are done.
This commit is contained in:
parent
1d3d61e16f
commit
415db65a70
1 changed files with 5 additions and 1 deletions
|
|
@ -200,7 +200,9 @@ print "\nREADY TO BEGIN UPGRADES\n" unless ($quiet);
|
|||
my $notRun = 1;
|
||||
|
||||
|
||||
my $currentPath = Cwd::getcwd();
|
||||
my $currentPath = Cwd::getcwd();
|
||||
my $totalConfigs = scalar keys %config;
|
||||
my $configCounter = 0;
|
||||
foreach my $filename (keys %config) {
|
||||
chdir($upgradesPath);
|
||||
my $clicmd = $config{$filename}{mysqlCLI} || $mysql;
|
||||
|
|
@ -208,8 +210,10 @@ foreach my $filename (keys %config) {
|
|||
my $backupTo = $config{$filename}{backupPath} || $backupDir;
|
||||
mkdir($backupTo);
|
||||
while ($upgrade{$config{$filename}{version}}{sql} ne "" || $upgrade{$config{$filename}{version}}{pl} ne "") {
|
||||
++$configCounter;
|
||||
my $upgrade = $upgrade{$config{$filename}{version}}{from};
|
||||
print "\n".$config{$filename}{db}." ".$upgrade{$upgrade}{from}."-".$upgrade{$upgrade}{to}."\n" unless ($quiet);
|
||||
print "Processing $configCounter out of $totalConfigs configs\n" unless ($quiet);
|
||||
unless ($skipBackup) {
|
||||
print "\tBacking up $config{$filename}{db} ($upgrade{$upgrade}{from})..." unless ($quiet);
|
||||
my $cmd = qq!$dumpcmd -u"$config{$filename}{dbuser}" -p"$config{$filename}{dbpass}"!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue