aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2017-07-11 08:22:09 -0400
committerMike Holmes <mike.holmes@linaro.org>2017-07-11 08:22:09 -0400
commit8536f851f1dfef74782aed5ea4f60f9d7bfa885f (patch)
tree0dbdcd2159fe36bac599e8e00d6660d685fbcbf4
parent423c4f0593f782797c2498967c04f804deea7f5b (diff)
Cleanup output dir
-rw-r--r--Signed_off_heatmaps.R5
-rw-r--r--company_interest.R17
-rw-r--r--member_heatmaps.R6
3 files changed, 20 insertions, 8 deletions
diff --git a/Signed_off_heatmaps.R b/Signed_off_heatmaps.R
index 422225c..44d96a3 100644
--- a/Signed_off_heatmaps.R
+++ b/Signed_off_heatmaps.R
@@ -120,14 +120,15 @@ if (id[2] == '') {
}
if (id[3] == '') {
- home <- getwd()
+ home <- paste(getwd(),"/git", sep="")
} else {
- home <- id[3]
+ home <- paste(id[3],"/git", sep="")
}
print(paste("Outputdir = ", home))
dir.create(home)
setwd(home)
+
user_password <- paste(id[1], id[2], sep=":")
h <- new_handle(failonerror = TRUE)
diff --git a/company_interest.R b/company_interest.R
index c637d4c..b7ac15b 100644
--- a/company_interest.R
+++ b/company_interest.R
@@ -150,7 +150,8 @@ watcher_heatmap <- function(report) {
# for (d in rows.to.delete) {
# m <- as.matrix(m[!grepl(d, rownames(m)),])
# }
-
+ dir.create("company")
+ setwd("company")
for (c in comp) {
v <- as.vector(m[c,])
@@ -159,6 +160,7 @@ watcher_heatmap <- function(report) {
display_barplot(report, v, "_wt")
}
+ setwd(home)
}
@@ -241,7 +243,7 @@ sponsor_heatmap <- function (report) {
}
#from the website get the initiatives list for the four teams
-id <- Sys.getenv(c("JIRA_USERNAME", "JIRA_PASSWORD"))
+id <- Sys.getenv(c("JIRA_USERNAME", "JIRA_PASSWORD","JIRA_OUTPUT"))
if (id[1] == '') {
print ("export JIRA_USERNAME='john.doe@linaro.org'")
q()
@@ -251,6 +253,16 @@ if (id[2] == '') {
q()
}
+if (id[3] == '') {
+ home <- paste(getwd(),"/git", sep="")
+} else {
+ home <- paste(id[3],"/company", sep="")
+}
+
+print(paste("Outputdir = ", home))
+dir.create(home)
+setwd(home)
+
user_password <- paste(id[1], id[2], sep=":")
h <- new_handle(failonerror = TRUE)
@@ -272,3 +284,4 @@ reports <-
apply(reports, 1, sponsor_heatmap)
apply(reports, 1, watcher_heatmap)
+setwd(home) \ No newline at end of file
diff --git a/member_heatmaps.R b/member_heatmaps.R
index 73f15d8..33a1b47 100644
--- a/member_heatmaps.R
+++ b/member_heatmaps.R
@@ -356,16 +356,14 @@ if (id[2] == '') {
user_password <- paste(id[1], id[2], sep=":")
if (id[3] == '') {
- home <- getwd()
+ home <- paste(getwd(),"/member", sep="")
} else {
- home <- id[3]
+ home <- paste(id[3],"/member", sep="")
}
print(paste("Outputdir = ", home))
dir.create(home)
setwd(home)
-dir.create("git")
-setwd("git")
h <- new_handle(failonerror = TRUE)
handle_setopt(h, verbose = 0)