Created
December 8, 2015 00:53
-
-
Save nmcspadden/fee3414c07f99d1054be to your computer and use it in GitHub Desktop.
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
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