File new.php changed (mode: 100644) (index eae5936..cdc197e) |
15 |
15 |
|
|
16 |
16 |
require_once __DIR__ . '/classes/Build.php'; |
require_once __DIR__ . '/classes/Build.php'; |
17 |
17 |
require_once __DIR__ . '/classes/Buildset.php'; |
require_once __DIR__ . '/classes/Buildset.php'; |
|
18 |
|
require_once __DIR__ . '/classes/Utils.php'; |
|
19 |
|
require_once __DIR__ . '/config.php'; |
18 |
20 |
|
|
19 |
21 |
if (sizeof($argv) < 3) { |
if (sizeof($argv) < 3) { |
20 |
22 |
print "Usage: ${argv[0]} name revision [builder-name..]\n"; |
print "Usage: ${argv[0]} name revision [builder-name..]\n"; |
|
... |
... |
if (sizeof($argv) < 3) { |
24 |
26 |
$name = $argv[1]; |
$name = $argv[1]; |
25 |
27 |
$revision = $argv[2]; |
$revision = $argv[2]; |
26 |
28 |
|
|
|
29 |
|
if (substr($name, 0, strlen('fragile/')) === 'fragile/') { |
|
30 |
|
$command = substr($name, strlen('fragile/')); |
|
31 |
|
switch ($command) { |
|
32 |
|
case 'clean': |
|
33 |
|
// XXX: ideally, this would only schedule the operation for the |
|
34 |
|
// daemon; currently, we can change FS in parallel with it |
|
35 |
|
Utils::delTree(BUILDS_PATH); |
|
36 |
|
exit("Cleaned ".BUILDS_PATH); |
|
37 |
|
|
|
38 |
|
default: |
|
39 |
|
exit("Unknown command: .$command"); |
|
40 |
|
} |
|
41 |
|
} |
|
42 |
|
|
27 |
43 |
$buildset = Buildset::create($name, $revision); |
$buildset = Buildset::create($name, $revision); |
28 |
44 |
|
|
29 |
45 |
if (sizeof($argv) > 3) { |
if (sizeof($argv) > 3) { |