make script python version agnostic

This commit is contained in:
Panagiotis Cheilaris 2013-06-04 09:50:34 +02:00
parent 4aade0bc6d
commit 373a733fc9
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# This script creates the directory structure for a new package.
# Usage: cgal_create_package_dir.py Package_name
@ -191,6 +191,7 @@ if re.match("^[A-Za-z_][A-Za-z0-9_]*$", packagename):
if os.path.exists(figfile):
shutil.copy(figfile, figpath)
else:
print "Error: Bad package name:", packagename
print "The package name should consist of:"
print "letters, digits and underscores and not start with a digit."
sys.stderr.write("Error: Bad package name: " + packagename + '\n')
sys.stderr.write("The package name should consist of:" + '\n')
sys.stderr.write \
("letters, digits and underscores and not start with a digit." + '\n')