github.com/dmaizel/tests@v0.0.0-20210728163746-cae6a2d9cee8/metrics/report/report_dockerfile/genreport.sh (about)

     1  #!/bin/bash
     2  # Copyright (c) 2018-2019 Intel Corporation
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  
     6  REPORTNAME="metrics_report.pdf"
     7  
     8  cd scripts
     9  
    10  Rscript --slave -e "library(knitr);knit('pdf.Rmd')"
    11  Rscript --slave -e "library(knitr);pandoc('pdf.md', format='latex')"
    12  
    13  Rscript --slave -e "library(knitr);knit('html.Rmd')"
    14  Rscript --slave -e "library(knitr);pandoc('html.md', format='html')"
    15  
    16  cp /scripts/pdf.pdf /outputdir/${REPORTNAME}
    17  cp /scripts/figure/*.png /outputdir/
    18  echo "PNGs of graphs and tables can be found in the output directory."
    19  echo "The report, named ${REPORTNAME}, can be found in the output directory"