Commit e39ee5fe authored by Matthias Braun's avatar Matthias Braun
Browse files

write config to stdout in generate config mode

parent 6b6bcbba
......@@ -5,6 +5,7 @@ import optparse # TODO argparse from python 2.7 on
import subprocess
import resource
import socket
import sys
from datetime import datetime
SCRIPT_VERSION="0.1"
......@@ -447,11 +448,13 @@ if __name__ == "__main__":
check_options(options)
progs = [prog for prog in filter_progs(options, args)]
conf = generate_spec_config(options, progs)
fh = open("config/generated.cfg", 'w')
fh.write(conf)
fh.close()
if options.config_only:
sys.stdout.write(conf)
exit(0)
else:
fh = open("config/generated.cfg", 'w')
fh.write(conf)
fh.close()
strprogs = " ".join(progs)
cmd = "env bash -l -c 'source shrc && runspec %s -c generated'" % strprogs
exit(os.system(cmd))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment