Just to keep track of how many helper functions we actually are using. In case I get brave and try to convert to C sometime.
17 lines
404 B
Python
Executable file
17 lines
404 B
Python
Executable file
#!/usr/bin/python
|
|
import sys, os
|
|
import vars
|
|
from helpers import err, add_dep, mkdirp
|
|
|
|
|
|
if not vars.TARGET:
|
|
err('redo-ifcreate: error: must be run from inside a .do\n')
|
|
sys.exit(100)
|
|
|
|
for t in sys.argv[1:]:
|
|
mkdirp('%s/.redo' % vars.BASE)
|
|
if os.path.exists(t):
|
|
err('redo-ifcreate: error: %r already exists\n' % t)
|
|
sys.exit(1)
|
|
else:
|
|
add_dep(vars.TARGET, 'c', t)
|