Merge remote-tracking branch 'origin/QA_3_5'
This commit is contained in:
commit
da9e55d2dc
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
#
|
||||
# Configuration converter
|
||||
# Converts from old-style (Pre-2.3) configuration files to new format found in PMA-2.3
|
||||
#
|
||||
# Takes input from STDIN, sends output to STDOUT
|
||||
#
|
||||
|
||||
while(<>)
|
||||
{ s/\$cfg(\w+)/\$cfg\[\'$1\'\]/g;
|
||||
print;
|
||||
}
|
||||
|
||||
|
||||
@ -139,14 +139,6 @@ echo "* Removing unneeded files"
|
||||
# if someone runs /test/wui.php and there are test failures
|
||||
rm -rf test
|
||||
|
||||
# Remove javascript compiler, no need to ship it
|
||||
rm -rf scripts/google-javascript-compiler/
|
||||
|
||||
# Remove scripts which are not useful for user
|
||||
for s in compress-js create-release.sh generate-mo mergepo.py php2gettext.sh remove_control_m.sh update-po upload-release pending-po pendingpo.py ; do
|
||||
rm -f scripts/$s
|
||||
done
|
||||
|
||||
# Remove git metadata
|
||||
rm -rf .git
|
||||
find . -name .gitignore -print0 | xargs -0 -r rm -f
|
||||
@ -162,7 +154,7 @@ for kit in $KITS ; do
|
||||
# Cleanup translations
|
||||
cd phpMyAdmin-$version-$kit
|
||||
scripts/lang-cleanup.sh $kit
|
||||
rm -f scripts/lang-cleanup.sh
|
||||
rm -f scripts
|
||||
cd ..
|
||||
|
||||
# Remove tar file possibly left from previous run
|
||||
|
||||
@ -1,116 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p po
|
||||
|
||||
|
||||
sed "
|
||||
s/' ;/';/;
|
||||
/to translate/D;
|
||||
/\$allow_recoding/D;
|
||||
s/\$byteUnits = array('\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)');/\$str_B = '\1';\n\$str_KiB = '\2';\n\$str_MiB = '\3';\n\$str_GiB = '\4';\n\$str_TiB = '\5';\n\$str_PiB = '\6';\n\$str_EiB = '\7';/;
|
||||
s/\$day_of_week = array('\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)');/\$str_Sun = '\1';\n\$str_Mon = '\2';\n\$str_Tue = '\3';\n\$str_Wed = '\4';\n\$str_Thu = '\5';\n\$str_Fri = '\6';\n\$str_Sat = '\7';\n/;
|
||||
s/\(\$month = array('.*', '.*', '.*', '.*', '.*', '.*',\) '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)');/\1\n\$str_Jul = '\2';\n\$str_Aug = '\3';\n\$str_Sep = '\4';\n\$str_Oct = '\5';\n\$str_Nov = '\6';\n\$str_Dec = '\7';\n/;
|
||||
s/\$month = array('\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)', '\(.*\)',/\$str_Jan = '\1';\n\$str_Feb = '\2';\n\$str_Mar = '\3';\n\$str_Apr = '\4';\n\$str_May = '\5';\n\$str_Jun = '\6';\n/;
|
||||
" < lang/english-utf-8.inc.php > po/english.php
|
||||
|
||||
for lang in lang/*.inc.php ; do
|
||||
loc=`basename $lang | sed 's/-utf-8.inc.php//'`
|
||||
# Unfold arrays, delete not translated strings
|
||||
sed "
|
||||
s/' ;/';/;
|
||||
/to translate/D;
|
||||
/^\/\//D;
|
||||
/\$allow_recoding/D;
|
||||
s/\$byteUnits *= *array('\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)');/\$str_B = '\1';\n\$str_KiB = '\2';\n\$str_MiB = '\3';\n\$str_GiB = '\4';\n\$str_TiB = '\5';\n\$str_PiB = '\6';\n\$str_EiB = '\7';/;
|
||||
s/\$day_of_week *= *array('\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)');/\$str_Sun = '\1';\n\$str_Mon = '\2';\n\$str_Tue = '\3';\n\$str_Wed = '\4';\n\$str_Thu = '\5';\n\$str_Fri = '\6';\n\$str_Sat = '\7';\n/;
|
||||
s/\(\$month *= *array('.*', *'.*', *'.*', *'.*', *'.*', *'.*',\) '\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)');/\1\n\$str_Jul = '\2';\n\$str_Aug = '\3';\n\$str_Sep = '\4';\n\$str_Oct = '\5';\n\$str_Nov = '\6';\n\$str_Dec = '\7';\n/;
|
||||
s/\$month *= *array('\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)', *'\(.*\)',/\$str_Jan = '\1';\n\$str_Feb = '\2';\n\$str_Mar = '\3';\n\$str_Apr = '\4';\n\$str_May = '\5';\n\$str_Jun = '\6';\n/;
|
||||
" < $lang > po/$loc.php
|
||||
|
||||
case $loc in
|
||||
afrikaans) langcode='af';;
|
||||
arabic) langcode='ar';;
|
||||
azerbaijani) langcode='az';;
|
||||
bangla) langcode='bn';;
|
||||
belarusian_cyrillic) langcode='be';;
|
||||
belarusian_latin) langcode='be@latin';;
|
||||
bulgarian) langcode='bg';;
|
||||
bosnian) langcode='bs';;
|
||||
catalan) langcode='ca';;
|
||||
czech) langcode='cs';;
|
||||
danish) langcode='da';;
|
||||
german) langcode='de';;
|
||||
greek) langcode='el';;
|
||||
english) langcode='en';;
|
||||
english-gb) langcode='en_GB';;
|
||||
spanish) langcode='es';;
|
||||
estonian) langcode='et';;
|
||||
basque) langcode='eu';;
|
||||
persian) langcode='fa';;
|
||||
finnish) langcode='fi';;
|
||||
french) langcode='fr';;
|
||||
galician) langcode='gl';;
|
||||
hebrew) langcode='he';;
|
||||
hindi) langcode='hi';;
|
||||
croatian) langcode='hr';;
|
||||
hungarian) langcode='hu';;
|
||||
indonesian) langcode='id';;
|
||||
italian) langcode='it';;
|
||||
japanese) langcode='ja';;
|
||||
korean) langcode='ko';;
|
||||
georgian) langcode='ka';;
|
||||
lithuanian) langcode='lt';;
|
||||
latvian) langcode='lv';;
|
||||
macedonian_cyrillic) langcode='mk';;
|
||||
mongolian) langcode='mn';;
|
||||
malay) langcode='ms';;
|
||||
dutch) langcode='nl';;
|
||||
norwegian) langcode='nb';;
|
||||
polish) langcode='pl';;
|
||||
brazilian_portuguese) langcode='pt_BR';;
|
||||
portuguese) langcode='pt';;
|
||||
romanian) langcode='ro';;
|
||||
russian) langcode='ru';;
|
||||
sinhala) langcode='si';;
|
||||
slovak) langcode='sk';;
|
||||
slovenian) langcode='sl';;
|
||||
albanian) langcode='sq';;
|
||||
serbian_latin) langcode='sr@latin';;
|
||||
serbian_cyrillic) langcode='sr';;
|
||||
swedish) langcode='sv';;
|
||||
thai) langcode='th';;
|
||||
turkish) langcode='tr';;
|
||||
tatarish) langcode='tt';;
|
||||
ukrainian) langcode='uk';;
|
||||
chinese_traditional) langcode='zh_TW';;
|
||||
chinese_simplified) langcode='zh_CN';;
|
||||
uzbek_cyrillic) langcode='uz';;
|
||||
uzbek_latin) langcode='uz@latin';;
|
||||
*) echo "Wrong loc: $loc"; exit 1;;
|
||||
esac
|
||||
|
||||
echo "$loc -> $langcode"
|
||||
if [ $langcode = en ] ; then
|
||||
php2po -i po/english.php -o po/phpmyadmin-update.pot -P
|
||||
sed -i '
|
||||
s/PACKAGE VERSION/phpMyAdmin 3.4/;
|
||||
s/Report-Msgid-Bugs-To: .*\\n/Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\\n/;
|
||||
' po/phpmyadmin-update.pot
|
||||
else
|
||||
php2po -t po/english.php -i po/$loc.php -o po/$langcode-update.po
|
||||
sed -i "
|
||||
s/PACKAGE VERSION/phpMyAdmin 3.4/;
|
||||
/, fuzzy/D;
|
||||
s/LANGUAGE <LL@li.org>/$loc <$langcode@li.org>/;
|
||||
s/YEAR-MO-DA HO:MI+ZONE/`date +'%Y-%m-%d %H:%M%z'`/;
|
||||
s/FULL NAME <EMAIL@ADDRESS>/Automatically generated/;
|
||||
s/Report-Msgid-Bugs-To: .*\\\\n/Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\\\\n/;
|
||||
" po/$langcode-update.po
|
||||
./scripts/mergepo.py po/$langcode.po po/$langcode-update.po
|
||||
msgmerge -U -C po/$langcode-update.po po/$langcode.po po/phpmyadmin.pot
|
||||
rm po/$langcode-update.po po/$loc.php
|
||||
fi
|
||||
done
|
||||
rm po/english.php po/phpmyadmin-update.pot
|
||||
@ -1,222 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
#
|
||||
# upgrade.pl - automatic phpmyadmin upgrader
|
||||
#
|
||||
#
|
||||
# 2005-05-08, swix@users.sourceforge.net:
|
||||
# - created script
|
||||
#
|
||||
# 2005-10-29 swix@users.sourceforge.net:
|
||||
# - some fixes & improvements
|
||||
#
|
||||
|
||||
use strict;
|
||||
my $source_url = "http://phpmyadmin.net/home_page/version.php";
|
||||
|
||||
|
||||
#
|
||||
# usage
|
||||
#
|
||||
|
||||
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";
|
||||
print " by the latest stable version of phpMyAdmin.\n";
|
||||
print " Your config.inc.php file will be preserved.\n\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
my $forced;
|
||||
my $targetdirectory;
|
||||
|
||||
if ($ARGV[0] eq "--force") {
|
||||
$forced = 1;
|
||||
$targetdirectory = $ARGV[1];
|
||||
} else {
|
||||
$forced = 0;
|
||||
$targetdirectory = $ARGV[0];
|
||||
}
|
||||
|
||||
if ($targetdirectory =~ /^(.*)\/$/) {
|
||||
# remove trailing slash, if any
|
||||
$targetdirectory = $1;
|
||||
}
|
||||
|
||||
if (!-d $targetdirectory) {
|
||||
print "error: target directory ($targetdirectory) does not exists\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!-f "$targetdirectory/config.inc.php") {
|
||||
print "error: target directory doesn't seem to contain phpMyAdmin\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# get current release information
|
||||
#
|
||||
|
||||
my $version;
|
||||
my $filename;
|
||||
my $directory;
|
||||
my $releasedate;
|
||||
my @urls;
|
||||
my @today;
|
||||
my $installedversion;
|
||||
|
||||
if (open(LATEST, "wget -o /dev/null -O - $source_url|")) {
|
||||
|
||||
$version = <LATEST>; chomp($version);
|
||||
$releasedate = <LATEST>; chomp($releasedate);
|
||||
$filename = "phpMyAdmin-" . $version . "-all-languages.tar.gz";
|
||||
$directory = "phpMyAdmin-" . $version . "-all-languages";
|
||||
|
||||
my $i = 0;
|
||||
|
||||
while (my $line = <LATEST>) {
|
||||
chomp($line);
|
||||
if ($line =~ /http/) {
|
||||
$urls[$i++] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
close(LATEST);
|
||||
|
||||
} else {
|
||||
|
||||
print "error: open of $source_url failed.\n";
|
||||
exit(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (-d $directory) {
|
||||
print "error: target directory ($directory) already exists, exiting\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#
|
||||
# check the installed version
|
||||
#
|
||||
|
||||
if (open(DEFINES, $targetdirectory .'/libraries/Config.class.php')) {
|
||||
my $versionStatus = 0;
|
||||
$installedversion = "unknownversion";
|
||||
|
||||
while (my $line = <DEFINES>) {
|
||||
|
||||
next unless $line =~ /'PMA_VERSION',\ '(.*)?'\);$/;
|
||||
$installedversion = $1;
|
||||
|
||||
# take care of "pl", "rc" and "dev": dev < rc < pl
|
||||
|
||||
my $converted_installedversion = $installedversion;
|
||||
$converted_installedversion =~ s/dev/aaa/g;
|
||||
$converted_installedversion =~ s/rc/bbb/g;
|
||||
$converted_installedversion =~ s/pl/ccc/g;
|
||||
|
||||
my $converted_version = $version;
|
||||
$converted_version =~ s/dev/aaa/g;
|
||||
$converted_version =~ s/rc/bbb/g;
|
||||
$converted_version =~ s/pl/ccc/g;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (!$versionStatus && !$forced) {
|
||||
print "Old version could not be identified, not updating (use \"--force\" if you are sure) \n";
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# ask for confirmation
|
||||
#
|
||||
|
||||
print "\n";
|
||||
print "phpMyAdmin upgrade summary:\n";
|
||||
print "---------------------------\n";
|
||||
print " phpMyAdmin Path: $targetdirectory\n";
|
||||
print " Installed version: $installedversion\n";
|
||||
print " Upgraded version: $version\n\n";
|
||||
print "Proceed with upgrade? [Y/n] ";
|
||||
my $kbdinput = <STDIN>; chomp($kbdinput);
|
||||
if (lc(substr($kbdinput,0,1)) ne "y" && length($kbdinput) >= 1) {
|
||||
print "Aborting.\n";
|
||||
exit(0);
|
||||
} else {
|
||||
print "Proceeding...\n\n";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# get file
|
||||
#
|
||||
|
||||
if (!-f $filename) {
|
||||
|
||||
print "getting phpMyAdmin $version\n";
|
||||
foreach my $url (@urls) {
|
||||
|
||||
print "trying $url...\n";
|
||||
system("wget -o /dev/null $url");
|
||||
if (-f $filename) {
|
||||
print "-> ok\n";
|
||||
last;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print "already got $filename, not downloading\n";
|
||||
}
|
||||
|
||||
|
||||
if (!-f $filename) {
|
||||
print "error: $filename download failed\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# setup
|
||||
#
|
||||
|
||||
print "installing...\n";
|
||||
|
||||
system("tar xzf $filename");
|
||||
if (!$directory) {
|
||||
print "error: $directory still not exists after untar...\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@today = localtime(time); $today[4]++; $today[5]+=1900;
|
||||
my $timestamp = sprintf("%04d%02d%02d%02d%02d", $today[5], $today[4], $today[3], $today[2], $today[1]);
|
||||
|
||||
my $backupdir = $targetdirectory . "-" . $timestamp . "-" . $installedversion;
|
||||
print "- backup directory: $backupdir\n";
|
||||
|
||||
system("cp $directory/config.inc.php $directory/config.inc-dist.php");
|
||||
print "- original distribution config.inc.php renamed to config.inc-dist.php\n";
|
||||
|
||||
system("cp $targetdirectory/config.inc.php $directory/config.inc.php");
|
||||
print "- previous config.inc.php copied to the new setup\n";
|
||||
|
||||
system("mv $targetdirectory $backupdir");
|
||||
system("mv $directory $targetdirectory");
|
||||
system("rm $filename");
|
||||
|
||||
print "\ndone! phpMyAdmin $version installed in $targetdirectory\n";
|
||||
print "backup of your old installation in $backupdir\n";
|
||||
print "Enjoy! :-)\n\n";
|
||||
Loading…
Reference in New Issue
Block a user