blob: 19deb1992be74b5aa234146fb5cd574db886e263 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import utils.checked_system
import os.path
def tar( source_dir, archive_name ):
utils.checked_system( [
'cd %s' % source_dir
, 'tar -c -f ../%s -z *' % archive_name
] )
def untar( archive_path ):
#utils.checked_system( [ 'tar -xjf "%s"' % archive_path ] )
utils.checked_system( [
'cd %s' % os.path.dirname( archive_path )
, 'tar -xjf "%s"' % os.path.basename( archive_path )
] )
|