Add the R builds script to file-scrapers reference
Unified · Split
| @@ -181,6 +181,28 @@ curl -L https://docs.python.org/ftp/python/doc/$RELEASE/python-$RELEASE-docs-htm · 180 unmodified lines | |||
| 181 | tar xj --strip-components=1 | 181 | tar xj --strip-components=1 |
| 182 | ``` | 182 | ``` |
| 183 | 183 | ||
| 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 | |||
| 184 | ## RDoc | 206 | ## RDoc |
| 185 | 207 | ||
| 186 | ### Nokogiri | 208 | ### Nokogiri |