diff options
author | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2005-11-30 18:55:48 +0300 |
---|---|---|
committer | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2005-11-30 18:55:48 +0300 |
commit | 9960c1102d508c3f1d6d3521959cab24f965a095 (patch) | |
tree | 62621ddbe03ca701948614d883ea7b0f2fdff827 /scripts | |
parent | cd73fb8e133563686f48ea2dac80c6d79a3a4d28 (diff) |
use libraries/Config.class.php
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/upgrade.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/upgrade.pl b/scripts/upgrade.pl index 543345947a..f0304b89d6 100755 --- a/scripts/upgrade.pl +++ b/scripts/upgrade.pl @@ -2,8 +2,8 @@ # # $Id$ # -# upgrade.pl - automatic phpmyadmin upgrader -# +# upgrade.pl - automatic phpmyadmin upgrader +# # # 2005-05-08, swix@users.sourceforge.net: # - created script @@ -20,7 +20,7 @@ my $source_url = "http://www.phpmyadmin.net/latest.txt"; # usage # -if (!$ARGV[0] || (($ARGV[0] eq "--force") && !$ARGV[1])) { +if (!$ARGV[0] || (($ARGV[0] eq "--force") && !$ARGV[1])) { print "\n"; print "usage: $0 [--force] <target_directory>\n\n"; print " The location specified by <target_directory> will be backed up and replaced\n"; @@ -32,12 +32,12 @@ if (!$ARGV[0] || (($ARGV[0] eq "--force") && !$ARGV[1])) { my $forced; my $targetdirectory; -if ($ARGV[0] eq "--force") { +if ($ARGV[0] eq "--force") { $forced = 1; - $targetdirectory = $ARGV[1]; + $targetdirectory = $ARGV[1]; } else { $forced = 0; - $targetdirectory = $ARGV[0]; + $targetdirectory = $ARGV[0]; } if ($targetdirectory =~ /^(.*)\/$/) { @@ -56,7 +56,7 @@ if (!-f "$targetdirectory/config.inc.php") { } -# +# # get current release information # @@ -103,7 +103,7 @@ if (-d $directory) { # check the installed version # -if (open(DEFINES, $targetdirectory .'/libraries/defines.lib.php')) { +if (open(DEFINES, $targetdirectory .'/libraries/Config.class.php')) { my $versionStatus = 0; $installedversion = "unknownversion"; @@ -127,11 +127,11 @@ if (open(DEFINES, $targetdirectory .'/libraries/defines.lib.php')) { if ($converted_installedversion gt $converted_version && !$forced) { print "Local version ($installedversion) newer than latest stable release ($version), not updating. (use \"--force\")\n"; exit(0); - + } elsif ($installedversion eq $version && !$forced) { print "Local version ($version) already up to date, not updating (you can use \"--force\")\n"; exit(0); - + } else { $versionStatus = 1; } @@ -142,9 +142,9 @@ if (open(DEFINES, $targetdirectory .'/libraries/defines.lib.php')) { } } -# +# # ask for confirmation -# +# print "\n"; print "phpMyAdmin upgrade summary:\n"; @@ -192,7 +192,7 @@ if (!-f $filename) { # # setup -# +# print "installing...\n"; |