def run(cmd): | |
'''Runs a command with subprocess, printing output in realtime''' | |
proc = subprocess.Popen( | |
cmd, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT | |
) | |
while proc.poll() is None: | |
l = proc.stdout.readline() | |
print l, | |
print proc.stdout.read() | |
cmd = [ | |
'/Applications/AutoDMG.app/Contents/MacOS/AutoDMG', | |
'-L', loglevel, | |
'build', templatepath, | |
'--download-updates', | |
'-o', dmg_output_path] | |
print "Full command: %s" % cmd | |
run(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment