diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-12-07 23:20:11 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2013-02-15 13:25:56 +0100 |
commit | 6dc61e7d9e87ad6821869dab61e5f005af2e0252 (patch) | |
tree | 1fc19a0bc0d67a695cd60b1a762e42295dd6667b /scripts/aurblup/aurblup-wrapper | |
parent | 21e6c3f65ff4b0daeac75d6d66dcdd33fb98d646 (diff) | |
download | aur-6dc61e7d9e87ad6821869dab61e5f005af2e0252.tar.gz aur-6dc61e7d9e87ad6821869dab61e5f005af2e0252.tar.xz |
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>
Diffstat (limited to 'scripts/aurblup/aurblup-wrapper')
-rwxr-xr-x | scripts/aurblup/aurblup-wrapper | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/aurblup/aurblup-wrapper b/scripts/aurblup/aurblup-wrapper new file mode 100755 index 00000000..b056030d --- /dev/null +++ b/scripts/aurblup/aurblup-wrapper @@ -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)); |