aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/highest_version_dir.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn/highest_version_dir.py')
-rw-r--r--gn/highest_version_dir.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gn/highest_version_dir.py b/gn/highest_version_dir.py
new file mode 100644
index 0000000000..650154e4f3
--- /dev/null
+++ b/gn/highest_version_dir.py
@@ -0,0 +1,13 @@
+#!/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 sys
+
+dirpath, = sys.argv[1:]
+
+print sorted(os.listdir(dirpath))[-1]