|
1 | 1 | <?php |
2 | 2 | if (!defined('PHP_VERSION_ID')) { |
3 | | - $version = explode('.', PHP_VERSION); |
4 | | - define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); |
| 3 | + $version = explode('.', PHP_VERSION); |
| 4 | + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); |
5 | 5 | } |
6 | 6 | if (PHP_VERSION_ID < 50300) { |
7 | | - echo "ERROR: PHP 5.3 or higher required\n"; |
8 | | - exit(1); |
| 7 | + echo "ERROR: PHP 5.3 or higher required\n"; |
| 8 | + exit(1); |
9 | 9 | } |
10 | 10 | if (!function_exists('mysqli_connect')) { |
11 | | - echo "ERROR: MySQLi extension not found\n"; |
12 | | - exit(1); |
| 11 | + echo "ERROR: MySQLi extension not found\n"; |
| 12 | + exit(1); |
13 | 13 | } |
14 | | -if (!file_exists('tools/latest.php')) { |
15 | | - echo "INFO: Adminer not found, downloading...\n"; |
16 | | - file_put_contents('tools/latest.php',file_get_contents('http://adminer.org/latest.php')); |
| 14 | +if (!file_exists('vendor/mindaphp/tools/latest.php')) { |
| 15 | + echo "INFO: Adminer not found, downloading...\n"; |
| 16 | + file_put_contents('vendor/mindaphp/tools/latest.php', file_get_contents('http://adminer.org/latest.php')); |
17 | 17 | } |
18 | | -if (!file_exists('tools/latest.php')) { |
19 | | - echo "ERROR: Could not write 'tools/latest.php'\n"; |
20 | | - exit(1); |
| 18 | +if (!file_exists('vendor/mindaphp/tools/latest.php')) { |
| 19 | + echo "ERROR: Could not write 'vendor/mindaphp/tools/latest.php'\n"; |
| 20 | + exit(1); |
21 | 21 | } |
22 | 22 | if (!file_exists('composer.phar')) { |
23 | | - echo "INFO: Composer not found, downloading...\n"; |
24 | | - file_put_contents('composer.phar',file_get_contents('https://getcomposer.org/composer.phar')); |
| 23 | + echo "INFO: Composer not found, downloading...\n"; |
| 24 | + file_put_contents('composer.phar', file_get_contents('https://getcomposer.org/composer.phar')); |
25 | 25 | } |
26 | 26 | if (!file_exists('composer.phar')) { |
27 | | - echo "ERROR: Could not write 'composer.phar'\n"; |
28 | | - exit(1); |
| 27 | + echo "ERROR: Could not write 'composer.phar'\n"; |
| 28 | + exit(1); |
29 | 29 | } |
30 | 30 | if (!file_exists('phpunit.phar')) { |
31 | | - echo "INFO: PHPUnit not found, downloading...\n"; |
32 | | - file_put_contents('phpunit.phar',file_get_contents('https://phar.phpunit.de/phpunit.phar')); |
| 31 | + echo "INFO: PHPUnit not found, downloading...\n"; |
| 32 | + file_put_contents('phpunit.phar', file_get_contents('https://phar.phpunit.de/phpunit.phar')); |
33 | 33 | } |
34 | 34 | if (!file_exists('phpunit.phar')) { |
35 | | - echo "ERROR: Could not write 'phpunit.phar'\n"; |
36 | | - exit(1); |
| 35 | + echo "ERROR: Could not write 'phpunit.phar'\n"; |
| 36 | + exit(1); |
37 | 37 | } |
38 | 38 | exit(0); |
0 commit comments