Add redo-ifcreate to match djb's design.

I'm not quite sure why this needs to be a separate program, however, so I'm
probably not testing it correctly.
This commit is contained in:
Avery Pennarun 2010-11-13 01:10:43 -08:00
commit 91cc82ff4a
2 changed files with 17 additions and 0 deletions

16
redo-ifcreate.py Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/python
import sys, os
import vars
from helpers import *
if not vars.TARGET:
sys.stderr.write('redo-ifcreate: error: must be run from inside a .do\n')
sys.exit(1)
for t in sys.argv[1:]:
mkdirp('%s/.redo' % vars.BASE)
if os.path.exists(t):
add_dep(vars.TARGET, 'm', t)
else:
add_dep(vars.TARGET, 'c', t)