From e06845aa03a077579f3f571277461fe3d7f64a38 Mon Sep 17 00:00:00 2001 From: Pariksheet Nanda Date: Mon, 15 Aug 2016 17:43:49 -0400 Subject: [PATCH] BUG: Fix R updater function - For some reason the exported bash function has trouble scoping the exported variable, so pass it explicitly as a function parameter. - Create R_LIBS_USER directory if necessary. - Correct printf expansion of R packages. - Fix various typos. - Use setwd() because we are spawning R in the /root directory. This more robust that relying on `su - $user`. - Enable echo for debugging. --- cgi-updater-payload.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cgi-updater-payload.sh b/cgi-updater-payload.sh index 677cea8..628da9e 100755 --- a/cgi-updater-payload.sh +++ b/cgi-updater-payload.sh @@ -34,10 +34,15 @@ python_install_packages() { } r_install_packages() { - local pkgs=\"$(sprintf "\",%s\"" "${r_pkgs[@]}")\" - R --quiet -vanilla -e <