aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHal Canary <halcanary@google.com>2018-12-05 11:58:05 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-12-06 14:21:33 +0000
commitb45d5124816ed9048e94e0a8e2b24f745b63cae7 (patch)
tree59e5744b7ccc18b3dbbf33e91f27c5f383114bb7 /bin
parent4cb703b4685c0aea038f5934b23aa6f9dd7a0d81 (diff)
downloadplatform_external_skqp-b45d5124816ed9048e94e0a8e2b24f745b63cae7.tar.gz
platform_external_skqp-b45d5124816ed9048e94e0a8e2b24f745b63cae7.tar.bz2
platform_external_skqp-b45d5124816ed9048e94e0a8e2b24f745b63cae7.zip
bin/sysopen: script moved to bin
No-Try: true Change-Id: I1b9b1be36c9ed2d574de681b90b98e56f45e70fa Reviewed-on: https://skia-review.googlesource.com/c/174588 Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sysopen21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/sysopen b/bin/sysopen
new file mode 100755
index 0000000000..f104ab9fa4
--- /dev/null
+++ b/bin/sysopen
@@ -0,0 +1,21 @@
+#! /usr/bin/env python2
+# 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 subprocess
+import sys
+
+def sysopen(arg):
+ plat = sys.platform
+ if plat.startswith('darwin'):
+ subprocess.call(["open", arg])
+ elif plat.startswith('win'):
+ os.startfile(arg)
+ else:
+ subprocess.call(["xdg-open", arg])
+
+if __name__ == '__main__':
+ for a in sys.argv[1:]:
+ sysopen(a)