MCPcopy
hub / github.com/apenwarr/redo / main

Function main

redo/cmd_ifcreate.py:7–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def main():
8 try:
9 env.inherit()
10 logs.setup(
11 tty=sys.stderr, parent_logs=env.v.LOG,
12 pretty=env.v.PRETTY, color=env.v.COLOR)
13
14 me = os.path.join(env.v.STARTDIR,
15 os.path.join(env.v.PWD, env.v.TARGET))
16 f = state.File(name=me)
17 for t in sys.argv[1:]:
18 if not t:
19 err('cannot build the empty target ("").\n')
20 sys.exit(204)
21 if os.path.exists(t):
22 err('redo-ifcreate: error: %r already exists\n' % t)
23 sys.exit(1)
24 else:
25 f.add_dep('c', t)
26 state.commit()
27 except KeyboardInterrupt:
28 sys.exit(200)
29
30
31if __name__ == '__main__':

Callers 1

cmd_ifcreate.pyFile · 0.70

Calls 2

add_depMethod · 0.95
errFunction · 0.85

Tested by

no test coverage detected