From e8a2bdfd61f1783c88e14de1ad986189ffe773c4 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Sun, 26 Oct 2003 07:35:09 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2570 --- tools/update_versions | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/update_versions b/tools/update_versions index 0d90e2862e..6392e85227 100755 --- a/tools/update_versions +++ b/tools/update_versions @@ -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