minor fixes
This commit is contained in:
parent
d21b09d547
commit
260c8159c7
@ -83,7 +83,7 @@ def run_script():
|
|||||||
with open(script_filename, 'w') as fd:
|
with open(script_filename, 'w') as fd:
|
||||||
fd.write(' && '.join([s for s in script]))
|
fd.write(' && '.join([s for s in script]))
|
||||||
os.chmod(script_filename, 0o700)
|
os.chmod(script_filename, 0o700)
|
||||||
subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lc', '/run.sh'], check=True)
|
subprocess.run(['lxc-execute', '-n', image, '--', '/bin/sh', '-lvc', '/run.sh'], check=True)
|
||||||
os.unlink(script_filename)
|
os.unlink(script_filename)
|
||||||
|
|
||||||
def copy_files(src, dst):
|
def copy_files(src, dst):
|
||||||
@ -98,8 +98,8 @@ for line in recipe:
|
|||||||
if line == 'RUN':
|
if line == 'RUN':
|
||||||
in_script = False
|
in_script = False
|
||||||
run_script()
|
run_script()
|
||||||
elif in_script and not line and not line.startswith('#'):
|
elif in_script and line and not line.startswith('#'):
|
||||||
script.append()
|
script.append(line)
|
||||||
elif line == 'SCRIPT':
|
elif line == 'SCRIPT':
|
||||||
script = []
|
script = []
|
||||||
in_script = True
|
in_script = True
|
||||||
|
Loading…
Reference in New Issue
Block a user