mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2570
This commit is contained in:
parent
a50e6a0c5e
commit
e8a2bdfd61
|
@ -113,7 +113,8 @@ def add_files(app, match, exec_file, non_exec_files=[]):
|
|||
|
||||
objects_to_commit.append(object)
|
||||
|
||||
def re_match_exec_filename(file):
|
||||
def re_match_exec_filename(filepath):
|
||||
file = os.path.basename(filepath)
|
||||
return re.match('[^.]+_([0-9]+)[.]([0-9]+)_(.+?)(?:[.]gz|[.]exe|[.]sit)?$', file)
|
||||
|
||||
def find_versions(app, dir):
|
||||
|
@ -130,7 +131,8 @@ def find_versions(app, dir):
|
|||
"""
|
||||
|
||||
for filepath in xsort(glob.glob(os.path.join(dir, '*'))):
|
||||
file = os.path.basename(filepath)
|
||||
if os.path.islink(filepath):
|
||||
continue
|
||||
if os.path.isdir(filepath):
|
||||
# add executable + bundle as app/core version
|
||||
exec_file = None
|
||||
|
@ -142,12 +144,12 @@ def find_versions(app, dir):
|
|||
continue
|
||||
if not match:
|
||||
# no executable found yet, try this one
|
||||
match = re_match_exec_filename(file)
|
||||
match = re_match_exec_filename(filepath)
|
||||
if match:
|
||||
# found an executable matching regexp
|
||||
exec_file = file
|
||||
exec_file = filepath
|
||||
continue
|
||||
non_exec_files.append(file)
|
||||
non_exec_files.append(filepath)
|
||||
if not match:
|
||||
print >>sys.stderr, " Ignoring directory", dir
|
||||
continue
|
||||
|
@ -156,7 +158,7 @@ def find_versions(app, dir):
|
|||
non_exec_files=non_exec_files)
|
||||
else:
|
||||
# add a single executable as app/core version
|
||||
match = re_match_exec_filename(file)
|
||||
match = re_match_exec_filename(filepath)
|
||||
if not match:
|
||||
print >>sys.stderr, " Ignoring unknown file", filepath
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue