[devdocsgjs/main: 1715/1867] Add the R builds script to file-scrapers reference
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1715/1867] Add the R builds script to file-scrapers reference
- Date: Fri, 19 Nov 2021 23:48:16 +0000 (UTC)
commit 3c3adb291184c26d7ba40df99a71d8a5bd783e36
Author: Cimbali <me cimba li>
Date: Thu Jun 10 09:53:57 2021 +0200
Add the R builds script to file-scrapers reference
docs/file-scrapers.md | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md
index b367a6ef..6fd4d4b9 100644
--- a/docs/file-scrapers.md
+++ b/docs/file-scrapers.md
@@ -181,6 +181,28 @@ curl -L https://docs.python.org/ftp/python/doc/$RELEASE/python-$RELEASE-docs-htm
tar xj --strip-components=1
```
+## R
+```bash
+DEVDOCSROOT=/path/to/devdocs/docs/R
+RLATEST=https://cran.r-project.org/src/base/R-latest.tar.gz # or /R-${VERSION::1}/R-$VERSION.tar.gz
+
+RSOURCEDIR=${TMPDIR:-/tmp}/R/latest
+RBUILDDIR=${TMPDIR:-/tmp}/R/build
+mkdir -p "$RSOURCEDIR" "$RBUILDDIR" "$DEVDOCSROOT"
+
+# Download, configure, and build with static HTML pages
+curl "$RLATEST" | tar -C "$RSOURCEDIR" -xzf - --strip-components=1
+(cd "$RBUILDDIR" && "$RSOURCEDIR/configure" --enable-prebuilt-html --with-recommended-packages
--disable-byte-compiled-packages --disable-shared --disable-java)
+make _R_HELP_LINKS_TO_TOPICS_=FALSE -C "$RBUILDDIR"
+
+# Export all html documentation built − global, and per-package
+cp -r "$RBUILDDIR/doc" "$DEVDOCSROOT/"
+ls -d "$RBUILDDIR"/library/*/html | while read orig; do
+ dest="$DEVDOCSROOT${orig#$RBUILDDIR}"
+ mkdir -p "$dest" && cp -r "$orig"/* "$dest/"
+done
+```
+
## RDoc
### Nokogiri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]