History

Merge pull request #1568 from Cimbali/patch-1

Add the R builds script to file-scrapers reference

Bryan Hernández committed 5 years ago

Commit 4286e902 parents 6773897 5721ca01 file · +22 −0Browse files

Unified · Split

docs/file-scrapers.md+22−0
@@ -181,6 +181,28 @@ curl -L https://docs.python.org/ftp/python/doc/$RELEASE/python-$RELEASE-docs-htm · 180 unmodified lines
181tar xj --strip-components=1181tar xj --strip-components=1
182```182```
183 183
184## R
185```bash
186DEVDOCSROOT=/path/to/devdocs/docs/r
187RLATEST=https://cran.r-project.org/src/base/R-latest.tar.gz # or /R-${VERSION::1}/R-$VERSION.tar.gz
188
189RSOURCEDIR=${TMPDIR:-/tmp}/R/latest
190RBUILDDIR=${TMPDIR:-/tmp}/R/build
191mkdir -p "$RSOURCEDIR" "$RBUILDDIR" "$DEVDOCSROOT"
192
193# Download, configure, and build with static HTML pages
194curl "$RLATEST" | tar -C "$RSOURCEDIR" -xzf - --strip-components=1
195(cd "$RBUILDDIR" && "$RSOURCEDIR/configure" --enable-prebuilt-html --with-recommended-packages --disable-byte-compiled-packages --disable-shared --disable-java)
196make _R_HELP_LINKS_TO_TOPICS_=FALSE -C "$RBUILDDIR"
197
198# Export all html documentation built − global, and per-package
199cp -r "$RBUILDDIR/doc" "$DEVDOCSROOT/"
200ls -d "$RBUILDDIR"/library/*/html | while read orig; do
201 dest="$DEVDOCSROOT${orig#$RBUILDDIR}"
202 mkdir -p "$dest" && cp -r "$orig"/* "$dest/"
203done
204```
205
184## RDoc206## RDoc
185 207
186### Nokogiri208### Nokogiri