mirror of https://github.com/BOINC/boinc.git
Merge pull request #2122 from JuhaSointusalo/update_versions-fix-multi-api_version
update_versions: handle multiple API_VERSION strings
This commit is contained in:
commit
d17d5936f9
|
@ -195,7 +195,7 @@ function get_api_version($a, $v, $p, $fds) {
|
|||
foreach ($fds as $fd) {
|
||||
if ($fd->main_program) {
|
||||
$path = "apps/$a/$v/$p/$fd->physical_name";
|
||||
$handle = popen("strings $path | grep API_VERSION", "r");
|
||||
$handle = popen("strings $path | egrep --max-count=1 '^API_VERSION_[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'", "r");
|
||||
$x = fread($handle, 8192);
|
||||
pclose($handle);
|
||||
$x = strstr($x, "API_VERSION_");
|
||||
|
|
Loading…
Reference in New Issue