$cmdtorun = "$Rlocation/bin/Rscript --no-save ./$scripts $realarg"; print "about to execute <<$cmdtorun>>\n"; $res = system("$cmdtorun"); + +Windows is similar but wrapper is a .bat script. Here is what +we use in the Center for High Throughput Computing for +packages, shared files for sets up jobs, job specific input, +the runtime etc. + + + dir + time /t + if not exist built-win32-R-2.10.1.tar.gz goto noruntime + set R_LIBS_USER=RLIBS + tar.exe -zxvf built-win32-R-2.10.1.tar.gz + if not exist RLIBS.tar.gz goto nolibs + tar.exe -zxvf RLIBS.tar.gz + set R_LIBS_USER=RLIBS + :nolibs + if not exist %2.tar.gz goto nojobfiles + tar -xvf %2.tar + :nojobfiles + if not exist sharedfiles.tar.gz goto nosharedfiles + tar -zxvf sharedfiles.tar.gz + :nosharedfiles + mkdir tmp + set PATH=%path%;.\bin + dir + dir .\bin + echo Try job now + Rscript.exe soartest.R + dir + echo Job completed + :noruntime + echo Failed to find runtime. This is bad!