diff --git a/mktarball.py b/mktarball.py index b62812242..46d6f3a10 100644 --- a/mktarball.py +++ b/mktarball.py @@ -4,13 +4,17 @@ # 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 $ +# $Id: mktarball.py,v 1.6 1999-12-18 23:56:14 just Exp $ # import os, sys -src, self = os.path.split(sys.argv[0]) +script = os.path.join(os.getcwd(), sys.argv[0]) +srcdir, scriptname = os.path.split(script) +wdir, src = os.path.split(srcdir) +os.chdir(wdir) + tar = src + ".tar" gz = tar + ".gz" tgz = src + ".tgz" @@ -18,6 +22,6 @@ tgz = src + ".tgz" print "source:", src print "dest:", tgz -os.system('tar --exclude=CVS --exclude=%s -cf %s %s' % (self, tar, src)) +os.system('tar --exclude=CVS --exclude=%s -cf %s %s' % (scriptname, tar, src)) os.system('gzip -9v %s' % tar) os.rename(gz, tgz)