#!bin/sh

# custom dir for the web root directory
webroot=$1

# store the CSV intermediate files here
temp=tmp
# store the SVG output here
output=`mktemp -d svg-XXXXXX`

perl stats/date-of-year.pl > $temp/date-of-year.csv
gnuplot -c stats/date-of-year.plot > $output/date-of-year.svg

perl stats/month-of-year.pl > $temp/month-of-year.csv
gnuplot -c stats/month-of-year.plot > $output/month-of-year.svg

perl stats/weekday-of-year.pl > $temp/weekday-of-year.csv
gnuplot -c stats/weekday-of-year.plot > $output/weekday-of-year.svg

perl stats/contrib-tail.pl > $temp/contrib-tail.csv
gnuplot -c stats/contrib-tail.plot > $output/contrib-tail.svg

perl stats/mail.pl > $temp/mail.csv
gnuplot -c stats/mail.plot > $output/mail.svg

perl stats/github-json.pl > $temp/github.csv
perl stats/gh-monthly.pl $temp/github.csv > $temp/gh-monthly.csv
gnuplot -c stats/gh-monthly.plot > $output/gh-monthly.svg

perl stats/gh-open.pl $temp/github.csv > $temp/gh-open.csv
gnuplot -c stats/gh-open.plot > $output/gh-open.svg

perl stats/gh-age.pl $temp/github.csv > $temp/gh-age.csv
gnuplot -c stats/gh-age.plot > $output/gh-age.svg

perl stats/gh-fixes.pl $temp/github.csv > $temp/gh-fixes.csv
gnuplot -c stats/gh-fixes.plot > $output/gh-fixes.svg

perl stats/files-over-time.pl > $temp/files-over-time.csv
gnuplot -c stats/files-over-time.plot > $output/files-over-time.svg

perl stats/bugfix-frequency.pl $webroot > $temp/bugfix-frequency.csv
gnuplot -c stats/bugfix-frequency.plot > $output/bugfix-frequency.svg

perl stats/API-calls-over-time.pl > $temp/API-calls-over-time.csv
gnuplot -c stats/API-calls-over-time.plot > $output/API-calls-over-time.svg

perl stats/protocols-over-time.pl > $temp/protocols-over-time.csv
gnuplot -c stats/protocols-over-time.plot > $output/protocols-over-time.svg

perl stats/tls-over-time.pl > $temp/tls-over-time.csv
perl stats/ssh-over-time.pl > $temp/ssh-over-time.csv
perl stats/h1-over-time.pl > $temp/h1-over-time.csv
perl stats/h2-over-time.pl > $temp/h2-over-time.csv
perl stats/h3-over-time.pl > $temp/h3-over-time.csv
perl stats/idn-over-time.pl > $temp/idn-over-time.csv
perl stats/resolver-over-time.pl > $temp/resolver-over-time.csv
gnuplot -c stats/backends-over-time.plot > $output/backends-over-time.svg

perl stats/3rdparty-over-time.pl > $temp/3rdparty-over-time.csv
gnuplot -c stats/3rdparty-over-time.plot > $output/3rdparty-over-time.svg

perl stats/http-over-time.pl > $temp/http-over-time.csv
gnuplot -c stats/http-over-time.plot > $output/http-over-time.svg

perl stats/daniel-vs-rest.pl > $temp/daniel-vs-rest.csv
gnuplot -c stats/daniel-vs-rest.plot > $output/daniel-vs-rest.svg

perl stats/daniel-commit-share.pl > $temp/daniel-commit-share.csv
gnuplot -c stats/daniel-commit-share.plot > $output/daniel-commit-share.svg

perl stats/authors-per-year.pl > $temp/authors-per-year.csv
gnuplot -c stats/authors-per-year.plot > $output/authors-per-year.svg

perl stats/authors-active.pl > $temp/authors-active.csv
gnuplot -c stats/authors-active.plot > $output/authors-active.svg

perl stats/commits-per-year.pl > $temp/commits-per-year.csv
gnuplot -c stats/commits-per-year.plot > $output/commits-per-year.svg

perl stats/commits-over-time.pl > $temp/commits-over-time.csv
gnuplot -c stats/commits-over-time.plot > $output/commits-over-time.svg

perl stats/coreteam-over-time.pl | grep "^[12]" | tr -d '(' | awk '{ print $1"-01-01;"$2; }' > $temp/coreteam-per-year.csv
perl stats/coreteam-over-time.pl | grep '^[12]' | cut -d" " -f 1,5 | tr -d '%' | awk '{ if($2 > 0) {print $1"-01-01;"$2; }}' > $temp/coreteam-percent.csv
gnuplot -c stats/coreteam-per-year.plot > $output/coreteam-per-year.svg

perl stats/80-percent.pl 95 > $temp/95-percent.csv
perl stats/80-percent.pl 90 > $temp/90-percent.csv
perl stats/80-percent.pl 80 > $temp/80-percent.csv
perl stats/80-percent.pl 70 > $temp/70-percent.csv
perl stats/80-percent.pl 60 > $temp/60-percent.csv
perl stats/80-percent.pl 50 > $temp/50-percent.csv
gnuplot -c stats/95-percent.plot > $output/95-percent.svg
gnuplot -c stats/90-percent.plot > $output/90-percent.svg
gnuplot -c stats/80-percent.plot > $output/80-percent.svg
gnuplot -c stats/70-percent.plot > $output/70-percent.svg
gnuplot -c stats/60-percent.plot > $output/60-percent.svg
gnuplot -c stats/50-percent.plot > $output/50-percent.svg

perl stats/comments.pl > $temp/comments.csv
gnuplot -c stats/comments.plot > $output/comments.svg

perl stats/filesize-over-time.pl > $temp/filesize-over-time.csv
gnuplot -c stats/filesize-over-time.plot > $output/filesize-over-time.svg

perl stats/setopts-over-time.pl | cut '-d;' -f2- > $temp/setopts-over-time.csv
gnuplot -c stats/setopts-over-time.plot > $output/setopts-over-time.svg

perl stats/days-per-release.pl $webroot > $temp/days-per-release.csv
gnuplot -c stats/days-per-release.plot > $output/days-per-release.svg

perl stats/cmdline-options-over-time.pl > $temp/cmdline-options-over-time.csv
gnuplot -c stats/cmdline-options-over-time.plot > $output/cmdline-options-over-time.svg

perl stats/contributors-over-time.pl | cut '-d;' -f2- > $temp/contributors-over-time.csv
gnuplot -c stats/contributors-over-time.plot > $output/contributors-over-time.svg

perl stats/authors.pl > $temp/authors.csv
gnuplot -c stats/authors.plot > $output/authors.svg

perl stats/authorremains.pl > $temp/authorremains.csv
gnuplot -c stats/authorremains.plot > $output/authorremains.svg
gnuplot -c stats/authorremains-top.plot > $output/authorremains-top.svg

perl stats/todo-over-time.pl > $temp/todo-over-time.csv
gnuplot -c stats/todo-over-time.plot > $output/todo-over-time.svg

perl stats/symbols-over-time.pl > $temp/symbols-over-time.csv
gnuplot -c stats/symbols-over-time.plot > $output/symbols-over-time.svg

perl stats/authors-per-month.pl > $temp/authors-per-month.csv
gnuplot -c stats/authors-per-month.plot > $output/authors-per-month.svg

perl stats/firsttimers.pl > $temp/firsttimers.csv
gnuplot -c stats/firsttimers.plot > $output/firsttimers.svg

#perl stats/CI-jobs-over-time.pl | cut '-d;' -f2-  > $temp/CI.csv
#gnuplot -c stats/CI-jobs-over-time.plot > $output/CI-jobs-over-time.svg
#gnuplot -c stats/CI-services.plot > $output/CI-services.svg

#perl stats/CI-platforms.pl > $temp/CI-platforms.csv
#gnuplot -c stats/CI-platforms.plot > $output/CI-platforms.svg

perl stats/commits-per-month.pl > $temp/commits-per-month.csv
gnuplot -c stats/commits-per-month.plot > $output/commits-per-month.svg

perl stats/docs-over-time.pl > $temp/docs-over-time.csv
gnuplot -c stats/docs-over-time.plot > $output/docs-over-time.svg

perl stats/vulns-releases.pl $webroot > $temp/vulns-releases.csv
#gnuplot -c stats/vulns-releases.plot > $output/vulns-releases.svg

perl stats/vuln-dist-code.pl $webroot > $temp/vuln-dist-code.csv
gnuplot -c stats/vuln-dist-code.plot > $output/vuln-dist-code.svg

perl stats/cve-age.pl $webroot > $temp/cve-age.csv
gnuplot -c stats/cve-age.plot > $output/cve-age.svg

perl stats/cve-fixtime.pl $webroot > $temp/cve-fixtime.csv
gnuplot -c stats/cve-fixtime.plot > $output/cve-fixtime.svg

perl stats/cve-intro.pl $webroot > $temp/cve-intro.csv
perl stats/vulns-over-time.pl $webroot > $temp/vulns-over-time.csv
gnuplot -c stats/vulns-over-time.plot > $output/vulns-plot.svg

perl stats/vulns-per-year.pl $webroot $temp/cve-intro.csv > $temp/vulns-per-year.csv
gnuplot -c stats/vulns-per-year.plot > $output/vulns-per-year.svg

perl stats/c-vuln-code.pl $webroot > $temp/c-vuln-code.csv
gnuplot -c stats/c-vuln-code.plot > $output/c-vuln-code.svg

perl stats/c-vuln-reports.pl $webroot > $temp/c-vuln-reports.csv
gnuplot -c stats/c-vuln-reports.plot > $output/c-reports.svg

perl stats/high-vuln-reports.pl $webroot > $temp/high-vuln-reports.csv
gnuplot -c stats/high-vuln-reports.plot > $output/high-reports.svg

perl stats/sev-per-year.pl $webroot > $temp/sev-per-year.csv
gnuplot -c stats/sev-per-year.plot > $output/sev-per-year.svg

perl stats/severity.pl $webroot > $temp/severity.csv
gnuplot -c stats/severity.plot > $output/severity.svg

perl stats/lines-over-time.pl > $temp/lines-over-time.csv
gnuplot -c stats/lines-over-time.plot > $output/lines-over-time.svg

perl stats/lines-per-month.pl > $temp/lines-per-month.csv
gnuplot -c stats/lines-per-month.plot > $output/lines-per-month.svg

perl stats/tests-over-time.pl > $temp/tests-over-time.csv
gnuplot -c stats/tests-over-time.plot > $output/tests-over-time.svg

perl stats/manpages-over-time.pl > $temp/manpages-over-time.csv
gnuplot -c stats/manpages-over-time.plot > $output/manpages-over-time.svg

perl stats/manpage.pl > $temp/manpage.csv
gnuplot -c stats/manpage.plot > $output/manpage.svg

perl stats/examples-over-time.pl > $temp/examples-over-time.csv
gnuplot -c stats/examples-over-time.plot > $output/examples-over-time.svg

perl stats/bugbounty-over-time.pl $webroot > $temp/bugbounty-over-time.csv
gnuplot -c stats/bugbounty-over-time.plot > $output/bugbounty-over-time.svg

perl stats/bugbounty-amounts.pl $webroot > $temp/bugbounty-amounts.csv
gnuplot -c stats/bugbounty-amounts.plot > $output/bugbounty-amounts.svg

perl stats/contributors-per-release.pl > $temp/contributors-per-release.csv
gnuplot -c stats/contributors-per-release.plot > $output/contributors-per-release.svg

perl stats/lines-person.pl > $temp/lines-person.csv
gnuplot -c stats/lines-person.plot > $output/lines-person.svg

perl stats/release-number.pl $webroot > $temp/release-number.csv
gnuplot -c stats/release-number.plot > $output/release-number.svg

perl stats/releases-per-year.pl $webroot > $temp/releases-per-year.csv
gnuplot -c stats/releases-per-year.plot > $output/releases-per-year.svg

perl stats/cpy-over-time.pl > $temp/cpy-over-time.csv
gnuplot -c stats/cpy-over-time.plot > $output/cpy-over-time.svg

perl stats/strncpy-over-time.pl > $temp/strncpy-over-time.csv
gnuplot -c stats/strncpy-over-time.plot > $output/strncpy-over-time.svg

perl stats/sscanf-over-time.pl > $temp/sscanf-over-time.csv
gnuplot -c stats/sscanf-over-time.plot > $output/sscanf-over-time.svg

perl stats/complexity.pl > $temp/complexity.csv
gnuplot -c stats/complexity.plot > $output/complexity.svg
gnuplot -c stats/funclen.plot > $output/funclen.svg

perl stats/line-complex.pl > $temp/line-complex.csv
gnuplot -c stats/line-complex.plot > $output/line-complex.svg

perl stats/complex-dist.pl > $temp/complex-dist.csv
gnuplot -c stats/complex-dist.plot > $output/complex-dist.svg

perl stats/codeage.pl > $temp/codeage.csv
gnuplot -c stats/codeage.plot > $output/codeage.svg

perl stats/top-cwe.pl $webroot > $temp/top-cwe.csv
gnuplot -c stats/top-cwe.plot > $output/top-cwe.svg

perl stats/testinfra-over-time.pl > $temp/testinfra-over-time.csv
gnuplot -c stats/testinfra-over-time.plot > $output/testinfra-over-time.svg

perl stats/project-age.pl $webroot > $temp/project-age.csv
gnuplot -c stats/project-age.plot > $output/project-age.svg

perl stats/plotdivision.pl $temp/lines-over-time.csv $temp/project-age.csv 0:1 0:1 > $temp/loc-per-day.csv
gnuplot -c stats/loc-per-day.plot > $output/loc-per-day.svg

perl stats/plotdivision.pl $temp/testinfra-over-time.csv $temp/lines-over-time.csv 0:1 0:1 1000 > $temp/testinfra-per-line.csv
gnuplot -c stats/testinfra-per-line.plot > $output/testinfra-per-line.svg

perl stats/plotdivision.pl $temp/testinfra-over-time.csv $temp/tests-over-time.csv 0:1 1:2 > $temp/testinfra-per-test.csv
gnuplot -c stats/testinfra-per-test.plot > $output/testinfra-per-test.svg

# Added LOC per LOC still present
perl stats/addedcode.pl > $temp/addedcode.csv
perl stats/plotdivision.pl $temp/addedcode.csv $temp/lines-over-time.csv  0:1 0:1 > $temp/added-per-line.csv
gnuplot -c stats/added-per-line.plot > $output/added-per-line.svg

# lines of docs per KLOC
#
# uses already generated CSV files to make a new one
perl stats/plotdivision.pl $temp/docs-over-time.csv $temp/lines-over-time.csv 0:1 0:1 1000 > $temp/lines-per-docs.csv
gnuplot -c stats/lines-per-docs.plot > $output/lines-per-docs.svg

# number of tests per KLOC

perl stats/plotdivision.pl $temp/tests-over-time.csv $temp/lines-over-time.csv  1:2 0:1 1000 > $temp/lines-per-test.csv
gnuplot -c stats/lines-per-test.plot > $output/lines-per-test.svg

# known vulnerability per KLOC

perl stats/plotdivision.pl $temp/vulns-releases.csv $temp/lines-over-time.csv 0:2 0:1 1000 > $temp/knownvulns-per-line.csv
gnuplot -c stats/knownvulns-per-line.plot > $output/knownvulns-per-line.svg

# authors and contributors per KLOC

perl stats/plotdivision.pl $temp/authors.csv $temp/lines-over-time.csv 0:2 0:1 1000 > $temp/lines-per-author.csv
perl stats/plotdivision.pl $temp/contributors-over-time.csv $temp/lines-over-time.csv 0:1 0:1 1000 > $temp/lines-per-contributor.csv
gnuplot -c stats/lines-per-author.plot > $output/lines-per-author.svg

# curl man page size per option
perl stats/plotdivision.pl $temp/manpage.csv $temp/cmdline-options-over-time.csv 1:2 0:1 > $temp/manpage-lines-per-option.csv
gnuplot -c stats/manpage-lines-per-option.plot > $output/manpage-lines-per-option.svg

# remaining authors per KLOC

perl stats/plotdivision.pl $temp/authorremains.csv $temp/lines-over-time.csv 0:1 0:1 1000 > $temp/remains-per-kloc.csv
gnuplot -c stats/remains-per-kloc.plot > $output/remains-per-kloc.svg

# top-40 authors with production code remaining in master
perl stats/top-remains.pl > $temp/top-remains.csv
gnuplot -c stats/top-remains.plot > $output/top-remains.svg

# CVE severity pie chart
perl stats/cve-pie-chart.pl $webroot > $temp/cve-pie-chart.csv
gnuplot -c stats/cve-pie-chart.plot > $output/cve-pie-chart.svg

cat >stats.list <<EOF
added-lines-per-line = $output/added-per-line.svg
api-calls = $output/API-calls-over-time.svg
author-activity = $output/authors-active.svg
author-density = $output/remains-per-kloc.svg
authors = $output/authors.svg
authors-of-50-percent = $output/50-percent.svg
authors-of-60-percent = $output/60-percent.svg
authors-of-70-percent = $output/70-percent.svg
authors-of-80-percent = $output/80-percent.svg
authors-of-90-percent = $output/90-percent.svg
authors-of-95-percent = $output/95-percent.svg
authors-per-kloc = $output/lines-per-author.svg
authors-per-month = $output/authors-per-month.svg
authors-per-year = $output/authors-per-year.svg
authors-remaining = $output/authorremains.svg
authors-remaining-toplist = $output/authorremains-top.svg
authors-top-40 = $output/top-remains.svg
authors-who-are-first-timers = $output/firsttimers.svg
backends = $output/backends-over-time.svg
bug-bounty = $output/bugbounty-over-time.svg
bug-bounty-amounts = $output/bugbounty-amounts.svg
bugfix-frequency = $output/bugfix-frequency.svg
c-mistakes = $output/c-vuln-code.svg
c-vulnerability-share = $output/c-reports.svg
cmdline-options-over-time = $output/cmdline-options-over-time.svg
comments-in-source-code = $output/comments.svg
commits = $output/commits-over-time.svg
commits-by-daniel = $output/daniel-commit-share.svg
commits-monthly = $output/month-of-year.svg
commits-per-day = $output/date-of-year.svg
commits-per-month = $output/commits-per-month.svg
commits-per-year = $output/commits-per-year.svg
commits-weekly = $output/weekday-of-year.svg
complexity = $output/complexity.svg
complexity-averarge = $output/line-complex.svg
complexity-distribution = $output/complex-dist.svg
contribution-tail = $output/contrib-tail.svg
contributors = $output/contributors-over-time.svg
contributors-per-release = $output/contributors-per-release.svg
coreteam-per-year = $output/coreteam-per-year.svg
curl-man-page-size = $output/manpage.svg
curl-man-size-per-option = $output/manpage-lines-per-option.svg
cwe-top = $output/top-cwe.svg
daniel-vs-rest = $output/daniel-vs-rest.svg
documentation = $output/docs-over-time.svg
documentation-per-kloc = $output/lines-per-docs.svg
examples = $output/examples-over-time.svg
file-size = $output/filesize-over-time.svg
files = $output/files-over-time.svg
function-length = $output/funclen.svg
github-age = $output/gh-age.svg
github-fixes = $output/gh-fixes.svg
github-monthly = $output/gh-monthly.svg
github-open = $output/gh-open.svg
http-versions = $output/http-over-time.svg
lines-added = $output/lines-person.svg
mail = $output/mail.svg
man-pages = $output/manpages-over-time.svg
memory-function-density = $output/cpy-over-time.svg
project-age = $output/project-age.svg
protocols = $output/protocols-over-time.svg
release-frequency = $output/days-per-release.svg
releases = $output/release-number.svg
releases-per-year = $output/releases-per-year.svg
setopts = $output/setopts-over-time.svg
source-code-age = $output/codeage.svg
source-code-delta = $output/lines-per-month.svg
source-code-lines = $output/lines-over-time.svg
source-code-lines-per-day = $output/loc-per-day.svg
sscanf-density = $output/sscanf-over-time.svg
strncpy-density = $output/strncpy-over-time.svg
symbols = $output/symbols-over-time.svg
test-infrastructure-lines = $output/testinfra-over-time.svg
test-infrastructure-per-kloc = $output/testinfra-per-line.svg
test-infrastructure-per-test = $output/testinfra-per-test.svg
tests = $output/tests-over-time.svg
tests-per-kloc = $output/lines-per-test.svg
third-parties = $output/3rdparty-over-time.svg
todo = $output/todo-over-time.svg
vulnerabilities-in-code = $output/vuln-dist-code.svg
vulnerabilities-per-kloc = $output/knownvulns-per-line.svg
vulnerabilities-per-time = $output/vulns-plot.svg
vulnerabilities-per-year = $output/vulns-per-year.svg
vulnerability-age = $output/cve-age.svg
vulnerability-high-low = $output/sev-per-year.svg
vulnerability-severity = $output/high-reports.svg
vulnerability-severity-distribution = $output/severity.svg
vulnerability-share = $output/cve-pie-chart.svg
vulnerability-time-to-fix = $output/cve-fixtime.svg
EOF

# Use the same names but point to the used CSV/data/input file
cat >stats.data <<EOF
added-lines-per-line = $temp/added-per-line.csv
api-calls = $temp/API-calls-over-time.csv
author-activity = $temp/authors-active.csv
author-density = $temp/remains-per-kloc.csv
authors = $temp/authors.csv
authors-of-50-percent = $temp/50-percent.csv
authors-of-60-percent = $temp/60-percent.csv
authors-of-70-percent = $temp/70-percent.csv
authors-of-80-percent = $temp/80-percent.csv
authors-of-90-percent = $temp/90-percent.csv
authors-of-95-percent = $temp/95-percent.csv
authors-per-kloc = $temp/lines-per-author.csv
authors-per-month = $temp/authors-per-month.csv
authors-per-year = $temp/authors-per-year.csv
authors-top-40 = $temp/top-remains.csv
authors-who-are-first-timers = $temp/firsttimers.csv
authors-remaining = $temp/authorremains.csv
authors-remaining-toplist = $temp/authorremains.csv
backends = $temp/tls-over-time.csv
bug-bounty = $temp/bugbounty-over-time.csv
bug-bounty-amounts = $temp/bugbounty-amounts.csv
bugfix-frequency = $temp/bugfix-frequency.csv
c-mistakes = $temp/c-vuln-code.csv
c-vulnerability-share = $temp/c-vuln-reports.csv
cmdline-options-over-time = $temp/cmdline-options-over-time.csv
comments-in-source-code = $temp/comments.csv
commits = $temp/commits-over-time.csv
commits-by-daniel = $temp/daniel-commit-share.csv
commits-per-day = $temp/date-of-year.csv
commits-per-month = $temp/commits-per-month.csv
commits-per-year = $temp/commits-per-year.csv
commits-weekly = $temp/weekday-of-year.csv
commits-monthly = $temp/month-of-year.csv
complexity = $temp/complexity.csv
complexity-averarge = $temp/line-complex.csv
complexity-distribution = $temp/complex-dist.csv
contribution-tail = $temp/contrib-tail.csv
contributors = $temp/contributors-over-time.csv
contributors-per-release = $temp/contributors-per-release.csv
coreteam-per-year = $temp/coreteam-per-year.csv
curl-man-page-size = $temp/manpage.csv
curl-man-size-per-option = $temp/manpage-lines-per-option.csv
cwe-top = $temp/top-cwe.csv
daniel-vs-rest = $temp/daniel-vs-rest.csv
documentation = $temp/docs-over-time.csv
documentation-per-kloc = $temp/lines-per-docs.csv
examples = $temp/examples-over-time.csv
file-size = $temp/filesize-over-time.csv
files = $temp/files-over-time.csv
function-length = $temp/funclen.csv
github-age = $temp/gh-age.csv
github-fixes = $temp/gh-fixes.csv
github-monthly = $temp/gh-monthly.csv
github-open = $temp/gh-open.csv
http-versions = $temp/http-over-time.csv
lines-added = $temp/lines-person.csv
mail = $temp/mail.csv
man-pages = $temp/manpages-over-time.csv
memory-function-density = $temp/cpy-over-time.csv
project-age = $temp/project-age.csv
protocols = $temp/protocols-over-time.csv
release-frequency = $temp/days-per-release.csv
releases = $temp/release-number.csv
releases-per-year = $temp/releases-per-year.csv
setopts = $temp/setopts-over-time.csv
source-code-age = $temp/codeage.csv
source-code-delta = $temp/lines-per-month.csv
source-code-lines = $temp/lines-over-time.csv
source-code-lines-per-day = $temp/loc-per-day.csv
sscanf-density = $temp/sscanf-over-time.csv
strncpy-density = $temp/strncpy-over-time.csv
symbols = $temp/symbols-over-time.csv
test-infrastructure-lines = $temp/testinfra-over-time.csv
test-infrastructure-per-kloc = $temp/testinfra-per-line.csv
test-infrastructure-per-test = $temp/testinfra-per-test.csv
tests = $temp/tests-over-time.csv
tests-per-kloc = $temp/lines-per-test.csv
third-parties = $temp/3rdparty-over-time.csv
todo = $temp/todo-over-time.csv
vulnerabilities-in-code = $temp/vuln-dist-code.csv
vulnerabilities-per-kloc = $temp/knownvulns-per-line.csv
vulnerabilities-per-time = $temp/vulns-over-time.csv
vulnerabilities-per-year = $temp/vulns-per-year.csv
vulnerability-severity = $temp/high-vuln-reports.csv
vulnerability-severity-distribution = $temp/severity.csv
vulnerability-age = $temp/cve-age.csv
vulnerability-high-low = $temp/sev-per-year.csv
vulnerability-share = $temp/cve-pie-chart.csv
vulnerability-time-to-fix = $temp/cve-fixtime.csv
EOF

# make the dir world readable
chmod 755 $output
