mirror of
https://github.com/elliotnunn/supermario.git
synced 2025-08-05 21:25:03 +00:00
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:
@@ -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')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user