28 lines
556 B
Plaintext
28 lines
556 B
Plaintext
|
#!/usr/bin/php
|
||
|
<?php
|
||
|
|
||
|
require __DIR__ . '/lib/bootstrap.php';
|
||
|
|
||
|
function main($args) {
|
||
|
$config = setup_vars();
|
||
|
|
||
|
$total = $args[0];
|
||
|
$pos = $args[1];
|
||
|
|
||
|
// Perform build tasks
|
||
|
|
||
|
if ($pos == 0) {
|
||
|
buildcommon();
|
||
|
if (array_key_exists('redirect', $config)) {
|
||
|
buildredirects( $config['redirect'] );
|
||
|
}
|
||
|
if (array_key_exists('golang-subpackages', $config)) {
|
||
|
buildgosubpackages( $config['golang-subpackages'] );
|
||
|
}
|
||
|
} else {
|
||
|
buildprojects($pos, array_decimate(listprojects(), $total, $pos));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
main(array_slice($_SERVER['argv'], 1));
|