Handle .do files that start with "#!/" to specify an explicit interpreter.
Now you can have your .do files interpreted by whatever interpreter you want.
This commit is contained in:
parent
f24d4f142b
commit
f641e52e3b
7 changed files with 38 additions and 11 deletions
|
|
@ -128,6 +128,9 @@ class BuildJob:
|
|||
if vars.VERBOSE: argv[1] += 'v'
|
||||
if vars.XTRACE: argv[1] += 'x'
|
||||
if vars.VERBOSE or vars.XTRACE: log_('\n')
|
||||
firstline = open(dofile).readline().strip()
|
||||
if firstline.startswith('#!/'):
|
||||
argv[0:2] = firstline[2:].split(' ')
|
||||
log('%s\n' % _nice(t))
|
||||
self.argv = argv
|
||||
sf.is_generated = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue