2010-07-27 22:18:17 +04:00
|
|
|
#!/usr/bin/env python
|
2011-11-23 23:13:44 +04:00
|
|
|
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
2010-07-27 22:18:17 +04:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2011-11-23 23:13:44 +04:00
|
|
|
"""Writes True if the argument is a directory."""
|
2010-07-27 22:18:17 +04:00
|
|
|
|
|
|
|
import os.path
|
|
|
|
import sys
|
|
|
|
|
2011-11-23 23:13:44 +04:00
|
|
|
def main():
|
2014-04-17 01:52:49 +04:00
|
|
|
sys.stdout.write(_is_dir(sys.argv[1]))
|
2011-11-23 23:13:44 +04:00
|
|
|
return 0
|
|
|
|
|
2014-04-17 01:52:49 +04:00
|
|
|
def _is_dir(dir_name):
|
|
|
|
return str(os.path.isdir(dir_name))
|
|
|
|
|
|
|
|
def DoMain(args):
|
|
|
|
"""Hook to be called from gyp without starting a separate python
|
|
|
|
interpreter."""
|
|
|
|
return _is_dir(args[0])
|
|
|
|
|
2011-11-23 23:13:44 +04:00
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(main())
|