File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,28 @@ curl -L https://docs.python.org/ftp/python/doc/$RELEASE/python-$RELEASE-docs-htm
181181tar xj --strip-components=1
182182```
183183
184+ ## R
185+ ``` bash
186+ DEVDOCSROOT=/path/to/devdocs/docs/r
187+ RLATEST=https://cran.r-project.org/src/base/R-latest.tar.gz # or /R-${VERSION::1}/R-$VERSION.tar.gz
188+
189+ RSOURCEDIR=${TMPDIR:-/ tmp} /R/latest
190+ RBUILDDIR=${TMPDIR:-/ tmp} /R/build
191+ mkdir -p " $RSOURCEDIR " " $RBUILDDIR " " $DEVDOCSROOT "
192+
193+ # Download, configure, and build with static HTML pages
194+ curl " $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)
196+ make _R_HELP_LINKS_TO_TOPICS_=FALSE -C " $RBUILDDIR "
197+
198+ # Export all html documentation built − global, and per-package
199+ cp -r " $RBUILDDIR /doc" " $DEVDOCSROOT /"
200+ ls -d " $RBUILDDIR " /library/* /html | while read orig; do
201+ dest=" $DEVDOCSROOT ${orig# $RBUILDDIR } "
202+ mkdir -p " $dest " && cp -r " $orig " /* " $dest /"
203+ done
204+ ```
205+
184206## RDoc
185207
186208### Nokogiri
You can’t perform that action at this time.
0 commit comments