Use tempfiles for disk image preparation
Previously these intermediates were placed in the build directory but immediately deleted. Unless we are going to make them easily available for inspection (hopefully not often required), they should just go in /tmp.
This commit is contained in:
parent
3a29153618
commit
caf4716632
|
@ -18,6 +18,7 @@ import shlex
|
|||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
|
||||
|
||||
|
@ -30,8 +31,8 @@ parser.add_argument('passthru', metavar='ARG', nargs='+', help='Build script arg
|
|||
config = parser.parse_args()
|
||||
|
||||
config.worktree = os.getcwd()
|
||||
config.tmpdir = path.join(config.worktree, '.dmg')
|
||||
config.hfsimg = path.join(config.worktree, '.dmg.dmg')
|
||||
config.tmpdir = tempfile.mkdtemp()
|
||||
handle, config.hfsimg = tempfile.mkstemp(suffix='.dmg')
|
||||
config.vmac = open(path.join(path.dirname(__file__), 'vmac_path.conf')).read().rstrip('\n')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue