Skip to content

Commit

Permalink
Log (when debug mode is on) full instal messages
Browse files Browse the repository at this point in the history
* closes #11
  • Loading branch information
jefferis committed Apr 16, 2015
1 parent 452e4a1 commit 09ca0f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Install_CMTK.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ def untar_binaries(f,target_dir):
'''
tar=tarfile.open(f)
td=tempfile.mkdtemp()
print("Extracting tar file")

cmtkgui.log("Extracting tar file")
tar.extractall(path=td,members=bin_files(tar))
# now move each binary to where we actually wanted it to go
binaries=bin_files(tar)
print("Installing binaries to "+target_dir)
cmtkgui.log("Installing binaries to "+target_dir)
if not os.path.isdir(target_dir):
os.makedirs(target_dir)
for binary in binaries:
frompath = os.path.join(td,binary.name)
# print 'from = '+frompath
cmtkgui.log('installing from = '+frompath+' to = '+ target_dir)
cmtkgui.movefile(frompath,target_dir)
print("Cleaning up!")
shutil.rmtree(td)
Expand Down

0 comments on commit 09ca0f2

Please sign in to comment.