diff options
Diffstat (limited to 'R/install-dev.sh')
-rwxr-xr-x | R/install-dev.sh | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/R/install-dev.sh b/R/install-dev.sh index 0f881208bc..45e6411705 100755 --- a/R/install-dev.sh +++ b/R/install-dev.sh @@ -29,27 +29,15 @@ set -o pipefail set -e -FWDIR="$(cd `dirname $0`; pwd)" +FWDIR="$(cd `dirname "${BASH_SOURCE[0]}"`; pwd)" LIB_DIR="$FWDIR/lib" mkdir -p $LIB_DIR pushd $FWDIR > /dev/null -if [ ! -z "$R_HOME" ] - then - R_SCRIPT_PATH="$R_HOME/bin" - else - # if system wide R_HOME is not found, then exit - if [ ! `command -v R` ]; then - echo "Cannot find 'R_HOME'. Please specify 'R_HOME' or make sure R is properly installed." - exit 1 - fi - R_SCRIPT_PATH="$(dirname $(which R))" -fi -echo "Using R_SCRIPT_PATH = ${R_SCRIPT_PATH}" - -# Generate Rd files if devtools is installed -"$R_SCRIPT_PATH/"Rscript -e ' if("devtools" %in% rownames(installed.packages())) { library(devtools); devtools::document(pkg="./pkg", roclets=c("rd")) }' +. $FWDIR/find-r.sh + +. $FWDIR/create-rd.sh # Install SparkR to $LIB_DIR "$R_SCRIPT_PATH/"R CMD INSTALL --library=$LIB_DIR $FWDIR/pkg/ |