summaryrefslogtreecommitdiffstats
path: root/o3d/build
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 19:56:24 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 19:56:24 +0000
commitccf02ac9bd67d4d49ad8264ae7fc6098e361ff4b (patch)
treefc6e4a0552431c7297798fad46f57fb76c35a3b3 /o3d/build
parentdfe9d1d2de7fd8d244599b79a22898cce8df7c81 (diff)
downloadchromium_src-ccf02ac9bd67d4d49ad8264ae7fc6098e361ff4b.zip
chromium_src-ccf02ac9bd67d4d49ad8264ae7fc6098e361ff4b.tar.gz
chromium_src-ccf02ac9bd67d4d49ad8264ae7fc6098e361ff4b.tar.bz2
Made all line endings consistently LF and added svn:eol-style=LF property to files with these names / extensions.
c cc h mm txt idl py js html css gyp gypi xml shader json htm README DEPS git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/build')
-rw-r--r--o3d/build/file_exists.py20
-rw-r--r--o3d/build/is_admin.py118
2 files changed, 69 insertions, 69 deletions
diff --git a/o3d/build/file_exists.py b/o3d/build/file_exists.py
index 6f6abb2..aac99b7 100644
--- a/o3d/build/file_exists.py
+++ b/o3d/build/file_exists.py
@@ -1,10 +1,10 @@
-#!/usr/bin/env python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os.path
-import sys
-
-sys.stdout.write(str(os.path.exists(sys.argv[1])))
-sys.exit(0)
+#!/usr/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os.path
+import sys
+
+sys.stdout.write(str(os.path.exists(sys.argv[1])))
+sys.exit(0)
diff --git a/o3d/build/is_admin.py b/o3d/build/is_admin.py
index 8fa30c4..33789a4 100644
--- a/o3d/build/is_admin.py
+++ b/o3d/build/is_admin.py
@@ -1,59 +1,59 @@
-#!/usr/bin/env python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# Checks if the user is running as admin
-
-import os
-import os.path
-import sys
-import subprocess
-import platform
-import re
-
-def IsAdminNT():
- # (1, 4, 0): '95',
- # (1, 4, 10): '98',
- # (1, 4, 90): 'ME',
- # (2, 4, 0): 'NT',
- # (2, 5, 0): '2000',
- # (2, 5, 1): 'XP',
- # (2, 5, 2): '2003',
- v = sys.getwindowsversion()
- v = v[3], v[0], v[1]
- # check that we are in vista or greater so we know that
- # 'whoami.exe' exists.
- if v[0] > 2 or (v[0] == 2 and v[1] >= 6):
- output = subprocess.Popen(['whoami.exe', '/all'],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()[0]
- elevated_sid = "S-1-16-12288"
- admin_sid = "S-1-5-32-544"
-
- if re.search(elevated_sid, output) and re.search(admin_sid, output):
- return True
- return False
- else:
- # Where in XP or 2000. For now just assume we are admin.
- return True
-
-def IsAdmin():
- if os.name == 'nt':
- is_admin = IsAdminNT()
- elif platform.system() == 'Darwin':
- is_admin = False
- elif platform.system() == 'Linux':
- is_admin = False
- else:
- is_admin = False
- return is_admin
-
-
-def main(args):
- sys.stdout.write(str(IsAdmin()))
-
-
-if __name__ == "__main__":
- main(sys.argv)
- sys.exit(0)
+#!/usr/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Checks if the user is running as admin
+
+import os
+import os.path
+import sys
+import subprocess
+import platform
+import re
+
+def IsAdminNT():
+ # (1, 4, 0): '95',
+ # (1, 4, 10): '98',
+ # (1, 4, 90): 'ME',
+ # (2, 4, 0): 'NT',
+ # (2, 5, 0): '2000',
+ # (2, 5, 1): 'XP',
+ # (2, 5, 2): '2003',
+ v = sys.getwindowsversion()
+ v = v[3], v[0], v[1]
+ # check that we are in vista or greater so we know that
+ # 'whoami.exe' exists.
+ if v[0] > 2 or (v[0] == 2 and v[1] >= 6):
+ output = subprocess.Popen(['whoami.exe', '/all'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()[0]
+ elevated_sid = "S-1-16-12288"
+ admin_sid = "S-1-5-32-544"
+
+ if re.search(elevated_sid, output) and re.search(admin_sid, output):
+ return True
+ return False
+ else:
+ # Where in XP or 2000. For now just assume we are admin.
+ return True
+
+def IsAdmin():
+ if os.name == 'nt':
+ is_admin = IsAdminNT()
+ elif platform.system() == 'Darwin':
+ is_admin = False
+ elif platform.system() == 'Linux':
+ is_admin = False
+ else:
+ is_admin = False
+ return is_admin
+
+
+def main(args):
+ sys.stdout.write(str(IsAdmin()))
+
+
+if __name__ == "__main__":
+ main(sys.argv)
+ sys.exit(0)