Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ce089
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Walmes Marques Zeviani
ce089
Commits
91706aa2
Commit
91706aa2
authored
6 years ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Aperfeiçoa o build.sh.
parent
5c58622a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
slides/build.sh
+36
-7
36 additions, 7 deletions
slides/build.sh
with
36 additions
and
7 deletions
slides/build.sh
+
36
−
7
View file @
91706aa2
#-----------------------------------------------------------------------
if
[
"
$1
"
=
"-h"
]
;
then
echo
'Usage:'
echo
' $1: filename without extension, e.g. `slides`.'
echo
' if $1 is -h, then shows this message.'
echo
' if $1 is --all, then compiles all Rnw files.'
echo
' $2: {0, 1}, remove LaTeX auxiliary files (.log, .aux, ...).'
else
FILENAME
=
$1
echo
"
\n
Converting Rnw to tex.
\n
"
knit
$FILENAME
.Rnw
echo
"
\n
Converting tex to PDF.
\n
"
pdflatex
$FILENAME
.tex
exit
0
fi
#-----------------------------------------------------------------------
if
[
"
$1
"
=
"--all"
]
;
then
RNWFILES
=
$(
ls
*
.Rnw
)
echo
$RNWFILES
for
RNW
in
$RNWFILES
;
do
FILE
=
"
${
RNW
%.*
}
"
echo
$FILE
Rscript
-e
"require(knitr); knit(
\"
$RNW
\"
)"
pdflatex
$FILE
pdflatex
$FILE
pdflatex
$FILE
rubber
--clean
$FILE
done
exit
0
fi
#-----------------------------------------------------------------------
RNW
=
$1
FILE
=
"
${
RNW
%.*
}
"
echo
"
\n
Converting Rnw to tex.
\n
"
knit
$RNW
echo
"
\n
Converting tex to PDF.
\n
"
pdflatex
$FILE
if
[
"$#"
-eq
2
]
;
then
if
[
"
$2
"
-eq
1
]
;
then
echo
"
\n
Deleting LaTeX auxiliary files.
\n
"
rubber
--clean
$FILE
NAME
rubber
--clean
$FILE
fi
fi
exit
0
#-----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment