Now deep clean is realy deep :)
This commit is contained in:
parent
9913ff6bb9
commit
450aefe9d2
@ -1,5 +1,5 @@
|
||||
cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
|
||||
|
||||
areThereAnyFolders <- FALSE
|
||||
whereAmI <- getwd()
|
||||
if(!is.null(location)){
|
||||
setwd(location)
|
||||
@ -10,40 +10,48 @@ cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
|
||||
setwd("LOG")
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
if(dir.exists("../ERROR")){
|
||||
setwd("../ERROR")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
|
||||
if(dir.exists("../EPCS")){
|
||||
setwd("../EPCS")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)|(epc$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolder <- TRUE
|
||||
}
|
||||
|
||||
if(dir.exists("../WRONGEPC")){
|
||||
setwd("../WRONGEPC")
|
||||
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)|(epc$)",
|
||||
list.files(), value = T)
|
||||
)}
|
||||
list.files(), value = T))
|
||||
areThereAnyFolders <- TRUE
|
||||
}
|
||||
|
||||
if(areThereAnyFolders){
|
||||
setwd("..")
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T)
|
||||
)
|
||||
|
||||
list.files(), value = T))
|
||||
} else {
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
list.files(), value = T))}
|
||||
}
|
||||
|
||||
if(!simplicity){
|
||||
file.remove(
|
||||
grep("(out$)|(endpoint$)|(log$)",
|
||||
|
||||
@ -10,7 +10,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
||||
|
||||
#############################################################
|
||||
############################spinup run############################
|
||||
##########################################################
|
||||
##########################################################
|
||||
|
||||
##Copy the variables from settings
|
||||
inputloc <- settings$inputloc
|
||||
@ -69,9 +69,9 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
||||
|
||||
if(!spincrash){##If spinup did not crashed, run the normal run.
|
||||
|
||||
#####################################################################
|
||||
###########################normal run#########################
|
||||
#################################################################
|
||||
#####################################################################
|
||||
###########################normal run#########################
|
||||
#################################################################
|
||||
|
||||
##for the sake of safe we set the location again
|
||||
setwd(inputloc)
|
||||
@ -120,7 +120,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
||||
}
|
||||
}
|
||||
|
||||
##if errorsign is 1 there is error, if it is 0 everything ok
|
||||
##if errorsign is 1 there is error, if it is 0 everything ok
|
||||
if(length(perror)>sum(perror)){
|
||||
errorsign <- 1
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user