Commit cf190570 by Dane Springmeyer

always untar and return a proper error code

parent 2dca7daf
......@@ -2,7 +2,8 @@ import sys
import tarfile
import os
tarball = sys.argv[1]
if not os.path.exists(tarball.replace('.tar.gz','')):
tarfile.open().extractall('.')
\ No newline at end of file
tarball = os.path.abspath(sys.argv[1])
dirname = os.path.dirname(tarball)
tfile = tarfile.open(tarball,'r:gz');
tfile.extractall(dirname)
sys.exit(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment