| 1 | # Small / fast R package
 | 
| 2 | #
 | 
| 3 | # Loaded by deps/wedge.sh.
 | 
| 4 | 
 | 
| 5 | set -o nounset
 | 
| 6 | set -o pipefail
 | 
| 7 | set -o errexit
 | 
| 8 | 
 | 
| 9 | # sourced
 | 
| 10 | WEDGE_NAME='RUnit'
 | 
| 11 | WEDGE_VERSION='2023-03-01'
 | 
| 12 | 
 | 
| 13 | # We are installing into /home/wedge-makeer, and we want to use it from
 | 
| 14 | # /home/andy or /home/uke
 | 
| 15 | #
 | 
| 16 | # WEDGE_IS_ABSOLUTE=1
 | 
| 17 | 
 | 
| 18 | # R hits the network
 | 
| 19 | WEDGE_LEAKY_BUILD=1
 | 
| 20 | 
 | 
| 21 | wedge-make() {
 | 
| 22 |   echo 'No make step'
 | 
| 23 | }
 | 
| 24 | 
 | 
| 25 | wedge-install() {
 | 
| 26 |   local build_dir=$1
 | 
| 27 |   local install_dir=$2
 | 
| 28 | 
 | 
| 29 |   INSTALL_DEST=$install_dir Rscript -e \
 | 
| 30 |     'install.packages(c("RUnit"), lib=Sys.getenv("INSTALL_DEST"), repos="https://cloud.r-project.org")'
 | 
| 31 | }
 | 
| 32 | 
 | 
| 33 | wedge-smoke-test() {
 | 
| 34 |   local install_dir=$1
 | 
| 35 | 
 | 
| 36 |   R_LIBS_USER=$install_dir Rscript -e \
 | 
| 37 |     'library("RUnit"); print("OK")'
 | 
| 38 | }
 |