Skip to content
Snippets Groups Projects
Commit e824a687 authored by Walmes Marques Zeviani's avatar Walmes Marques Zeviani
Browse files

Comenta pedaços do script shell.

parent 4ff6d6b4
No related branches found
No related tags found
No related merge requests found
# Removes the _site/. # Removes the _site/.
rm -r _site/ # rm -r _site/
# Rscript -e "library(rmarkdown); clean_site()" # Rscript -e "library(rmarkdown); clean_site()"
# The root file. # The root file.
...@@ -7,20 +7,20 @@ echo $PWD ...@@ -7,20 +7,20 @@ echo $PWD
THEROOT=$PWD THEROOT=$PWD
cd $THEROOT cd $THEROOT
# List of Rmd files. # # List of Rmd files.
RMDFILES=$(find . -name \*.Rmd -print) # RMDFILES=$(find . -name \*.Rmd -print)
echo $RMDFILES # echo $RMDFILES
#
# Runs rmarkdown::render() in each Rmd file down in the tree. # # Runs rmarkdown::render() in each Rmd file down in the tree.
for RMD in $RMDFILES; do # for RMD in $RMDFILES; do
DIRNAME=`dirname "$RMD"` # DIRNAME=`dirname "$RMD"`
RMDNAME=`basename "$RMD"` # RMDNAME=`basename "$RMD"`
cd $DIRNAME # cd $DIRNAME
if [[ "$DIRNAME" == "./slides" || "$DIRNAME" == "./tutoriais" ]]; then # if [[ "$DIRNAME" == "./slides" || "$DIRNAME" == "./tutoriais" ]]; then
Rscript -e "library(rmarkdown); render(\"$RMDNAME\")" # Rscript -e "library(rmarkdown); render(\"$RMDNAME\")"
fi # fi
cd $THEROOT # cd $THEROOT
done # done
# Renders the site. # Renders the site.
Rscript -e "library(rmarkdown); render_site()" Rscript -e "library(rmarkdown); render_site()"
...@@ -29,6 +29,7 @@ firefox _site/index.html ...@@ -29,6 +29,7 @@ firefox _site/index.html
# Remove os Rmd. # Remove os Rmd.
rm -r --verbose _site/slides/*.Rmd rm -r --verbose _site/slides/*.Rmd
rm -r --verbose _site/slides/*.Rnw
rm -r --verbose _site/tutoriais/*.Rmd rm -r --verbose _site/tutoriais/*.Rmd
# Visualiza a árvore de arquivos/diretórios. # Visualiza a árvore de arquivos/diretórios.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment