From bd43f205407dc23fd0d260025c4cfe28c706498a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Jun 2005 21:56:35 +0000 Subject: [PATCH] Fix #1066363 - directory name matches tarball name git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7250 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Tools/mkdist.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SWIG/Tools/mkdist.py b/SWIG/Tools/mkdist.py index 2cc09a547..ac5f81943 100755 --- a/SWIG/Tools/mkdist.py +++ b/SWIG/Tools/mkdist.py @@ -1,19 +1,24 @@ #!/usr/local/bin/python -# This script builds a SWIG-1.3 distribution. -# Usage : mkdist.py directory, where directory should be SWIG-1.3.x +# This script builds a swig-1.3 distribution. +# Usage : mkdist.py directory, where directory should be swig-1.3.x import sys import string +import os try: dirname = sys.argv[1] except: - print "Usage: mkdist.py directory, where directory should be SWIG-1.3.x" + print "Usage: mkdist.py directory, where directory should be swig-1.3.x" sys.exit(0) +# Check name matches normal unix conventions +if string.lower(dirname) != dirname: + print "directory name ("+dirname+") should be in lowercase" + sys.exit(0) + # If directory exists, remove it -import os print "Removing ", dirname os.system("rm -rf "+dirname) @@ -46,6 +51,6 @@ print "Building documentation" os.system("cd "+dirname+"/Doc/Manual; make; rm *.bak") # Build the tar-ball -os.system("tar -cf "+string.lower(dirname)+".tar "+dirname) -os.system("gzip "+string.lower(dirname)+".tar") +os.system("tar -cf "+dirname+".tar "+dirname) +os.system("gzip "+dirname+".tar")