mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Remove aurblup configuration file parser
Drop the (very bad) PHP parser and allow for passing all necessary configuration via command line parameters. Also, add a convenience wrapper written in PHP that parses the configuration file and subsequently calls aurblup with correct command line options. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
21e6c3f65f
commit
6dc61e7d9e
3 changed files with 56 additions and 73 deletions
17
scripts/aurblup/aurblup-wrapper
Executable file
17
scripts/aurblup/aurblup-wrapper
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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("config.inc.php");
|
||||
|
||||
exec($dir . "/../scripts/aurblup/aurblup " .
|
||||
"-S /var/run/mysqld/mysqld.sock " .
|
||||
"-u " . escapeshellarg(AUR_db_user) . " " .
|
||||
"-p " . escapeshellarg(AUR_db_pass) . " " .
|
||||
"-D " . escapeshellarg(AUR_db_name));
|
Loading…
Add table
Add a link
Reference in a new issue