1999-12-18 23:05:58 +00:00
|
|
|
#! /usr/bin/env python
|
1999-12-18 23:28:54 +00:00
|
|
|
#
|
|
|
|
# Script to make a compressed tar archive of the directory
|
|
|
|
# the script is living in, excluding CVS directories and the
|
|
|
|
# script itself.
|
|
|
|
#
|
|
|
|
# $Id: mktarball.py,v 1.5 1999-12-18 23:28:54 Just Exp $
|
|
|
|
#
|
|
|
|
|
1999-12-18 23:05:58 +00:00
|
|
|
|
1999-12-18 23:09:30 +00:00
|
|
|
import os, sys
|
|
|
|
|
1999-12-18 23:25:16 +00:00
|
|
|
src, self = os.path.split(sys.argv[0])
|
1999-12-18 23:05:58 +00:00
|
|
|
tar = src + ".tar"
|
|
|
|
gz = tar + ".gz"
|
|
|
|
tgz = src + ".tgz"
|
|
|
|
|
1999-12-18 23:25:16 +00:00
|
|
|
print "source:", src
|
|
|
|
print "dest:", tgz
|
|
|
|
|
|
|
|
os.system('tar --exclude=CVS --exclude=%s -cf %s %s' % (self, tar, src))
|
1999-12-18 23:10:58 +00:00
|
|
|
os.system('gzip -9v %s' % tar)
|
1999-12-18 23:05:58 +00:00
|
|
|
os.rename(gz, tgz)
|