mirror of https://github.com/CGAL/cgal
copy sample image to new package directory
This commit is contained in:
parent
56814aa8cf
commit
8cb53ceb9d
|
|
@ -7,6 +7,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
|
import shutil
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Create directory structure for a new CGAL package.')
|
description='Create directory structure for a new CGAL package.')
|
||||||
|
|
@ -133,6 +134,14 @@ if re.match("^[A-Za-z_][A-Za-z0-9_]*$", packagename):
|
||||||
descrfile.write(descrstring)
|
descrfile.write(descrstring)
|
||||||
descrfile.close()
|
descrfile.close()
|
||||||
|
|
||||||
|
# try to find figure pkg-small.png and copy it to figure path
|
||||||
|
scriptdir = os.path.dirname(sys.argv[0])
|
||||||
|
cgaldir = os.path.dirname(os.path.dirname(scriptdir))
|
||||||
|
figfile = os.path.join(cgaldir, 'Documentation', 'doc', 'fig',
|
||||||
|
'pkg-small.png')
|
||||||
|
|
||||||
|
if os.path.exists(figfile):
|
||||||
|
shutil.copy(figfile, figpath)
|
||||||
else:
|
else:
|
||||||
print "Error: Bad package name:", packagename
|
print "Error: Bad package name:", packagename
|
||||||
print "The package name should consist of:"
|
print "The package name should consist of:"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue