diff --git a/.gitignore b/.gitignore index 0c48e960..1cd5a7d5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /editor*.php /vendor/ /composer.lock +/temp diff --git a/bin/export.sh b/bin/export.sh new file mode 100644 index 00000000..76437481 --- /dev/null +++ b/bin/export.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +# Root directory. +BASEDIR=$( cd `dirname $0`/.. ; pwd ) +cd "$BASEDIR" + +php compile.php +php compile.php en +php compile.php de +php compile.php cs +php compile.php sk + +php compile.php mysql +php compile.php mysql en +php compile.php mysql de +php compile.php mysql cs +php compile.php mysql sk + +php compile.php editor +php compile.php editor en +php compile.php editor mysql +php compile.php editor mysql en diff --git a/changes.txt b/changes.txt index 657d02cb..af52d0d2 100644 --- a/changes.txt +++ b/changes.txt @@ -11,6 +11,7 @@ Adminer 4.9.0-dev: - Fix several bugs and security issues in AdminerFileUpload plugin. - Skip dump of generated columns. - Update composer.json. +- Add script for exporting compiled adminer variants. Adminer 4.8.2 (released 2024-03-16): Support multi-line table comments diff --git a/compile.php b/compile.php index 822a1ba1..9cc5d4a5 100755 --- a/compile.php +++ b/compile.php @@ -451,6 +451,7 @@ $file = preg_replace('~"\.\./externals/jush/modules/(jush\.js)"~', $replace, $fi $file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file); $file = php_shrink($file); -$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php"; +@mkdir("temp/export", 0777, true); +$filename = "temp/export/$project" . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php"; file_put_contents($filename, $file); echo "$filename created (" . strlen($file) . " B).\n";