|
||||
0001 #!/bin/bash 0002 0003 # 0004 # Licensed to the Apache Software Foundation (ASF) under one or more 0005 # contributor license agreements. See the NOTICE file distributed with 0006 # this work for additional information regarding copyright ownership. 0007 # The ASF licenses this file to You under the Apache License, Version 2.0 0008 # (the "License"); you may not use this file except in compliance with 0009 # the License. You may obtain a copy of the License at 0010 # 0011 # http://www.apache.org/licenses/LICENSE-2.0 0012 # 0013 # Unless required by applicable law or agreed to in writing, software 0014 # distributed under the License is distributed on an "AS IS" BASIS, 0015 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0016 # See the License for the specific language governing permissions and 0017 # limitations under the License. 0018 # 0019 0020 # Script to create API docs and vignettes for SparkR 0021 # This requires `devtools`, `knitr` and `rmarkdown` to be installed on the machine. 0022 0023 # After running this script the html docs can be found in 0024 # $SPARK_HOME/R/pkg/html 0025 # The vignettes can be found in 0026 # $SPARK_HOME/R/pkg/vignettes/sparkr_vignettes.html 0027 0028 set -o pipefail 0029 set -e 0030 0031 # Figure out where the script is 0032 export FWDIR="$(cd "`dirname "${BASH_SOURCE[0]}"`"; pwd)" 0033 export SPARK_HOME="$(cd "`dirname "${BASH_SOURCE[0]}"`"/..; pwd)" 0034 0035 # Required for setting SPARK_SCALA_VERSION 0036 . "${SPARK_HOME}/bin/load-spark-env.sh" 0037 0038 echo "Using Scala $SPARK_SCALA_VERSION" 0039 0040 pushd "$FWDIR" > /dev/null 0041 . "$FWDIR/find-r.sh" 0042 0043 # Install the package (this will also generate the Rd files) 0044 . "$FWDIR/install-dev.sh" 0045 0046 # Now create HTML files 0047 0048 # knit_rd puts html in current working directory 0049 mkdir -p pkg/html 0050 pushd pkg/html 0051 0052 "$R_SCRIPT_PATH/Rscript" -e 'libDir <- "../../lib"; library(SparkR, lib.loc=libDir); library(knitr); knit_rd("SparkR", links = tools::findHTMLlinks(paste(libDir, "SparkR", sep="/")))' 0053 0054 popd 0055 0056 popd
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |