GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/391080 )

Change subject: install script knows where it lives
......................................................................

install script knows where it lives

Change-Id: I79774f46487619763089a163c3d0c0684e743ebd
---
M _installProduction_analytics-wmde.R
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM 
refs/changes/80/391080/1

diff --git a/_installProduction_analytics-wmde.R 
b/_installProduction_analytics-wmde.R
index 1f54867..8a020db 100644
--- a/_installProduction_analytics-wmde.R
+++ b/_installProduction_analytics-wmde.R
@@ -3,13 +3,26 @@
 ### --- Hey hey: 
 ### --- run as sudo -u analytics-wmde Rscript 
/srv/analytics-wmde/installRlib/_installProduction_analytics-wmde.R
 
+# - setup
+### --- NOTE: {kimisc} is the only WDCM relevant R package
+### --- that needs to be installed manually
+
 # - set proxy:
 Sys.setenv(
   http_proxy = "http://webproxy.eqiad.wmnet:8080";,
   https_proxy = "http://webproxy.eqiad.wmnet:8080";)
 
+fPath <- as.character(commandArgs(trailingOnly = FALSE)[4])
+fPath <- gsub("--file=", "", fPath, fixed = T)
+fPath <- unlist(strsplit(fPath, split = "/", fixed = T))
+fPath <- paste(
+  paste(fPath[1:length(fPath) - 1], collapse = "/"),
+  "/",
+  sep = "")
+
 # - install WDCM related packages:
 install.packages(c("dplyr", "httr", "stringr", "XML", "readr", 
                    "data.table", "tidyr", "maptpx", "Rtsne"),
-                 lib = "/srv/analytics-wmde/r-library",
-                 repos = c(CRAN = "https://www.stats.bris.ac.uk/R/";))
\ No newline at end of file
+                 lib = paste(fPath, "r-library", sep = ""),
+                 repos = c(CRAN = "https://www.stats.bris.ac.uk/R/";))
+

-- 
To view, visit https://gerrit.wikimedia.org/r/391080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79774f46487619763089a163c3d0c0684e743ebd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic <goran.milovanovic_...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to