summaryrefslogtreecommitdiffstats
path: root/scripts/aurblup/aurblup-wrapper
blob: c7b20afe920dcfd0acda8b85511b889d7cd1645d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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));