Initial commit.
This commit is contained in:
23
.emacs.d/elpa/ess-20160208.453/etc/ESSR/LOADREMOTE
Normal file
23
.emacs.d/elpa/ess-20160208.453/etc/ESSR/LOADREMOTE
Normal file
@@ -0,0 +1,23 @@
|
||||
## -*- mode: R -*-
|
||||
## loading code which is first sent to R on remote sessions
|
||||
local({
|
||||
curver <- '%s'
|
||||
## MM: ok for Windows?
|
||||
## VS: Should be fine (who is using win remote anyways?)
|
||||
.c.dir <- '~/.config/ESSR'
|
||||
verfile <- file.path(.c.dir, 'VERSION')
|
||||
envfile <- file.path(.c.dir, 'ESSR.rda')
|
||||
ver <- if(file.exists(verfile)) scan(verfile, what = "string") else "0.0"
|
||||
tryCatch({
|
||||
if(ver < curver) {
|
||||
url <- paste('http://vitalie.spinu.info/ESSR/ESSR_', curver, '.rda', sep = '')
|
||||
if(!file.exists(.c.dir))
|
||||
dir.create(.c.dir, recursive = TRUE)
|
||||
utils::download.file(url, envfile)
|
||||
cat(curver, file = verfile)
|
||||
}
|
||||
load(envfile)
|
||||
attach(ESSR)
|
||||
print(TRUE)
|
||||
} , error = function(e) print(FALSE))
|
||||
})
|
Reference in New Issue
Block a user