library/roles/R/templates/update_r_packages.sh.j2: Fix the R updater script, it does not parses the repository URL correctly.

This commit is contained in:
Andrea Dell'Amico 2017-01-25 15:04:47 +01:00
parent 2ddfc19a6e
commit 6bd5e63426
1 changed files with 1 additions and 2 deletions

View File

@ -153,7 +153,7 @@ function r_cran_pkgs() {
is_mirror=$( echo $l | grep ':' ) is_mirror=$( echo $l | grep ':' )
is_mirror_ret=$? is_mirror_ret=$?
if [ $is_mirror_ret -eq 0 ] ; then if [ $is_mirror_ret -eq 0 ] ; then
mirror=$( echo $l | cut -d : -f 2 ) mirror=$( echo $l | cut -d : -f 2- )
else else
mirror=$R_CRAN_MIRROR mirror=$R_CRAN_MIRROR
fi fi
@ -173,7 +173,6 @@ function r_github_pkgs() {
logger "update_r_packages: Installing R packages from Github" logger "update_r_packages: Installing R packages from Github"
for l in $( cat $R_PKGS_GITHUB ) ; do for l in $( cat $R_PKGS_GITHUB ) ; do
pkg=$( echo $l | cut -d "/" -f 2 ) pkg=$( echo $l | cut -d "/" -f 2 )
user=$( echo $l | cut -d "/" -f 1 )
if [ "$ACTION" == "upgrade" ] ; then if [ "$ACTION" == "upgrade" ] ; then
Rscript --slave --no-save --no-restore-history -e "require(devtools); require(methods); install_github('$l');" Rscript --slave --no-save --no-restore-history -e "require(devtools); require(methods); install_github('$l');"
else else