On systems where 'python' refers to python3, redo failed to launch. All invocations of python have been made explicitly python2 invocations. All tests pass on an Arch Linux system as of this commit.
22 lines
563 B
Python
Executable file
22 lines
563 B
Python
Executable file
#!/usr/bin/env python2
|
|
import sys, os
|
|
import vars, state
|
|
from log import err
|
|
|
|
|
|
try:
|
|
me = os.path.join(vars.STARTDIR,
|
|
os.path.join(vars.PWD, vars.TARGET))
|
|
f = state.File(name=me)
|
|
for t in sys.argv[1:]:
|
|
if not t:
|
|
err('cannot build the empty target ("").\n')
|
|
sys.exit(204)
|
|
if os.path.exists(t):
|
|
err('redo-ifcreate: error: %r already exists\n' % t)
|
|
sys.exit(1)
|
|
else:
|
|
f.add_dep('c', t)
|
|
state.commit()
|
|
except KeyboardInterrupt:
|
|
sys.exit(200)
|