Project

General

Profile

Incident #5626 ยป webtg.R

Gianpaolo Coro, Nov 02, 2016 06:11 PM

 
1
#the first directory to display data from
2
start_display_dir="20070823_23"
3
command = paste("/home/gcube/webtg/remtg/webtg -o -d /home/gcube/webtg/remtg/data/ipy_fixed42p_2.0l_IPY@32p/",start_display_dir,sep="")
4
cat("computation started\n")
5
cat(command,"\n")
6
system(command, intern = FALSE)
7
cat("computation finishedn")
8

    
9
output_file="webtg_output"
10
output_file<-paste(output_file,"_",Sys.time(),".zip",sep="")
11
output_file<-gsub(" ", "_", output_file)
12
output_file<-gsub(":", "_", output_file)
13

    
14
outputfolder = "/home/gcube/tmp/ipy_fixed42p_2.0l_IPY/"
15

    
16
zip <- paste("zip -r ",output_file," ",outputfolder,sep="")
17

    
18
#check if the output exists before exiting
19
fexists = file.exists(paste(output_file,sep=""))
20
cat("file exists?",fexists,"\n")
21
if (!fexists){
22
  cat(fexists,"Error, the output does not exist!\n")
23
  stoptheprocess
24
}
25

    
26
cat("deleting output folder\n")
27
command = paste("rm -r ",outputfolder)
28
system(command, intern = FALSE)
29
cat("computation finished\n")
    (1-1/1)
    Add picture from clipboard (Maximum size: 8.91 MB)