mirror of https://github.com/BOINC/boinc.git
boinccmd: add --get_project_urls command to list project URLs, one per line
A script that wants to do some operation - say, update - on all projects can call this, parse the result, then do the operation on each project.
This commit is contained in:
parent
47410322ef
commit
16ac049357
|
@ -250,6 +250,10 @@ int main(int argc, char** argv) {
|
|||
PROJECTS ps;
|
||||
retval = rpc.get_project_status(ps);
|
||||
if (!retval) ps.print();
|
||||
} else if (!strcmp(cmd, "--get_project_urls")) {
|
||||
PROJECTS ps;
|
||||
retval = rpc.get_project_status(ps);
|
||||
if (!retval) ps.print_urls();
|
||||
} else if (!strcmp(cmd, "--get_simple_gui_info")) {
|
||||
SIMPLE_GUI_INFO info;
|
||||
retval = rpc.get_simple_gui_info(info);
|
||||
|
|
|
@ -423,6 +423,7 @@ struct PROJECTS {
|
|||
~PROJECTS();
|
||||
|
||||
void print();
|
||||
void print_urls();
|
||||
void clear();
|
||||
};
|
||||
|
||||
|
|
|
@ -311,6 +311,13 @@ void PROJECTS::print() {
|
|||
}
|
||||
}
|
||||
|
||||
void PROJECTS::print_urls() {
|
||||
unsigned int i;
|
||||
for (i=0; i<projects.size(); i++) {
|
||||
printf("%s\n", projects[i]->master_url);
|
||||
}
|
||||
}
|
||||
|
||||
void DISK_USAGE::print() {
|
||||
unsigned int i;
|
||||
printf("======== Disk usage ========\n");
|
||||
|
|
Loading…
Reference in New Issue