|
|
@@ -478,9 +478,15 @@ class HTMLReportCreator(ReportCreator):
|
|
478
|
478
|
self.title = data.projectname
|
|
479
|
479
|
|
|
480
|
480
|
# copy static files if they do not exist
|
|
|
481
|
+ basedirs = [os.path.dirname(os.path.abspath(__file__)), '/usr/share/gitstats']
|
|
481
|
482
|
for file in ('gitstats.css', 'sortable.js', 'arrow-up.gif', 'arrow-down.gif', 'arrow-none.gif'):
|
|
482
|
|
- basedir = os.path.dirname(os.path.abspath(__file__))
|
|
483
|
|
- shutil.copyfile(basedir + '/' + file, path + '/' + file)
|
|
|
483
|
+ for base in basedirs:
|
|
|
484
|
+ src = base + '/' + file
|
|
|
485
|
+ if os.path.exists(src):
|
|
|
486
|
+ shutil.copyfile(src, path + '/' + file)
|
|
|
487
|
+ break
|
|
|
488
|
+ else:
|
|
|
489
|
+ print 'Warning: "%s" not found, so not copied (searched: %s)' % (file, basedirs)
|
|
484
|
490
|
|
|
485
|
491
|
f = open(path + "/index.html", 'w')
|
|
486
|
492
|
format = '%Y-%m-%d %H:%M:%S'
|