-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
redo-ifcreate.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |