add version to tarball filename
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@159 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
0de2a0f1d5
commit
3b18bdadb3
15
mktarball.py
15
mktarball.py
@ -4,17 +4,25 @@
|
||||
# the script is living in, excluding CVS directories and the
|
||||
# script itself.
|
||||
#
|
||||
# $Id: mktarball.py,v 1.7 2000-02-13 17:36:44 just Exp $
|
||||
# $Id: mktarball.py,v 1.8 2001-08-10 16:49:17 jvr Exp $
|
||||
#
|
||||
|
||||
|
||||
import os, sys
|
||||
|
||||
|
||||
program = os.path.normpath(sys.argv[0])
|
||||
script = os.path.join(os.getcwd(), program)
|
||||
srcdir, scriptname = os.path.split(script)
|
||||
wdir, src = os.path.split(srcdir)
|
||||
|
||||
try:
|
||||
execfile(os.path.join(srcdir, "Lib", "fontTools", "__init__.py"))
|
||||
version # make sure we now have a variable named "version"
|
||||
except (IOError, NameError):
|
||||
version = None
|
||||
|
||||
|
||||
destdir = None
|
||||
if sys.argv[1:]:
|
||||
destdir = os.path.normpath(os.path.join(os.getcwd(), sys.argv[1]))
|
||||
@ -22,7 +30,10 @@ if sys.argv[1:]:
|
||||
|
||||
os.chdir(wdir)
|
||||
|
||||
tar = src + ".tar"
|
||||
if version:
|
||||
tar = src + "-%s.tar" % version
|
||||
else:
|
||||
tar = src + ".tar"
|
||||
gz = tar + ".gz"
|
||||
|
||||
print "source:", src
|
||||
|
Loading…
x
Reference in New Issue
Block a user