5c54892412
This avoids bugs when other directories (like the Driver SDK) show up in those folders. Bug: skia:7395 Change-Id: Iee316a7daf8d71223b999de736d63e1dc7fa31f7 Reviewed-on: https://skia-review.googlesource.com/83542 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
16 lines
304 B
Python
16 lines
304 B
Python
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2017 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import os
|
|
import re
|
|
import sys
|
|
|
|
dirpath = sys.argv[1]
|
|
regex = re.compile(sys.argv[2])
|
|
|
|
print sorted(filter(regex.match, os.listdir(dirpath)))[-1]
|