コード例 #1
0
ファイル: all.py プロジェクト: nlfiedler/Sublime-Erlang
def main():
    """Perform the build, if necessary."""
    if len(sys.argv) > 1:
        build_dir = sys.argv[1]
    else:
        build_dir = os.getcwd()

    os.chdir(build_dir)

    for source in glob.glob("*.JSON-tmLanguage"):
        target = grammar.xml_filename(source)
        if must_build(source, target):
            print("Building %s" % target)
            grammar.build(source)
        else:
            print("%s is up to date." % target)
コード例 #2
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
def must_build(source, target):
	return (not os.path.exists(target)) \
		or (os.path.getmtime(source) >= os.path.getmtime(target))

if len(sys.argv) > 1:
    dir = sys.argv[1]
else:
    dir = os.getcwd()

os.chdir(dir)

for source in glob.glob('*.JSON-tmLanguage'):
	target = grammar.xml_filename(source)
	if must_build(source, target):
		print 'Building %s' % target
		grammar.build(source)
	else:
		print '%s is up to date.' % target

########NEW FILE########
__FILENAME__ = clean
#!/usr/bin/env python

import grammar, os, os.path, glob, sys

if len(sys.argv) > 1:
    dir = sys.argv[1]
else:
    dir = os.getcwd()

os.chdir(dir)
コード例 #3
0
    return (not os.path.exists(target)) \
     or (os.path.getmtime(source) >= os.path.getmtime(target))


if len(sys.argv) > 1:
    dir = sys.argv[1]
else:
    dir = os.getcwd()

os.chdir(dir)

for source in glob.glob('*.JSON-tmLanguage'):
    target = grammar.xml_filename(source)
    if must_build(source, target):
        print 'Building %s' % target
        grammar.build(source)
    else:
        print '%s is up to date.' % target

########NEW FILE########
__FILENAME__ = clean
#!/usr/bin/env python

import grammar, os, os.path, glob, sys

if len(sys.argv) > 1:
    dir = sys.argv[1]
else:
    dir = os.getcwd()

os.chdir(dir)