mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Replace web/lib/config.inc.php with an INI-style configuration file. This allows us to get rid of several globals and makes it easier to use the same configuration file in external scripts. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
21 lines
535 B
PHP
Executable file
21 lines
535 B
PHP
Executable file
#!/usr/bin/php
|
|
<?php
|
|
$dir = $argv[1];
|
|
|
|
if (empty($dir)) {
|
|
echo "Please specify AUR directory.\n";
|
|
exit;
|
|
}
|
|
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . "$dir/lib");
|
|
include("confparser.inc.php");
|
|
|
|
$user = config_get('database', 'user');
|
|
$password = config_get('database', 'password');
|
|
$name = config_get('database', 'name');
|
|
|
|
exec($dir . "/../scripts/aurblup/aurblup " .
|
|
"-S /var/run/mysqld/mysqld.sock " .
|
|
"-u " . escapeshellarg($user) . " " .
|
|
"-p " . escapeshellarg($password) . " " .
|
|
"-D " . escapeshellarg($name));
|