Last active
March 3, 2018 20:30
-
-
Save curtisalexander/7dd6ddff900c2a7aa4461b34aa4dbde8 to your computer and use it in GitHub Desktop.
Revisions
-
curtisalexander revised this gist
Mar 3, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ if [ ! -d "cran-dl" ] ; then fi echo "Note that cran-dl requires the following R packages be installed:" echo " - docopt" echo " - httr" echo " - purrr" -
curtisalexander renamed this gist
Mar 3, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
curtisalexander revised this gist
Mar 3, 2018 . 1 changed file with 55 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,55 @@ #!/usr/bin/env zsh # where to begin? DIR="${HOME}/code" cd "${DIR}" echo echo "Working from within ${PWD}" echo # clone cran-dl repo if [ ! -d "cran-dl" ] ; then printf "Would you like to clone cran-dl? [y/N]: " if read -q; then echo; git clone https://github.com/curtisalexander/cran-dl; echo fi fi echo "Please ensure the following R packages are installed: " echo " - docopt" echo " - httr" echo " - purrr" echo " - rvest" echo " - xml2" echo echo "To install within R, execute the following:" echo " - install.packages(c(\"docopt\", \"httr\", \"purrr\", \"rvest\", \"xml2\"))" # create the directory if it does not exist if [ ! -d "r-pkgs" ] ; then echo echo "Making the directory r-pkgs" mkdir -p "${DIR}/r-pkgs" fi # from the command line, download the tar.gz file echo echo "Download the package using cran-dl" ${DIR}/cran-dl/cran-dl --pkg=openssl --path="${DIR}/r-pkgs" echo # get the current openssl version echo echo "Get the current version of openssl" OPENSSL_VER="$(openssl version | cut -d' ' -f 2)" echo " - ${OPENSSL_VER}" # install using appropriate configuration OPENSSL_R_VER="$(ls -1 ${DIR}/r-pkgs | grep ^openssl | sort -R | head -1)" echo echo "Installing...${OPENSSL_R_VER}" echo sudo R CMD INSTALL -l /Library/Frameworks/R.framework/Resources/library --configure-vars='INCLUDE_DIR=/usr/local/opt/openssl/include LIB_DIR=/usr/local/opt/openssl/lib' "${DIR}/r-pkgs/${OPENSSL_R_VER}" -
curtisalexander created this gist
Feb 8, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ sudo R CMD INSTALL -l /Library/Frameworks/R.framework/Resources/library --configure-vars='INCLUDE_DIR=/usr/local/Cellar/[email protected]/1.1.0g_1/include LIB_DIR=/usr/local/Cellar/[email protected]/1.1.0g_1/lib' ~/Downloads/openssl_1.0.tar.gz