diff options
Diffstat (limited to 'gn/highest_version_dir.py')
-rw-r--r-- | gn/highest_version_dir.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gn/highest_version_dir.py b/gn/highest_version_dir.py index 650154e4f3..1b82697d9a 100644 --- a/gn/highest_version_dir.py +++ b/gn/highest_version_dir.py @@ -6,8 +6,10 @@ # found in the LICENSE file. import os +import re import sys -dirpath, = sys.argv[1:] +dirpath = sys.argv[1] +regex = re.compile(sys.argv[2]) -print sorted(os.listdir(dirpath))[-1] +print sorted(filter(regex.match, os.listdir(dirpath)))[-1] |