-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On remotes fetch ESSR binary from github
... instead of my personal site
- Loading branch information
Showing
5 changed files
with
21 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +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" | ||
ver <- '1.3' | ||
root <- '~/.config/ESSR' | ||
if(!file.exists(root)) | ||
dir.create(root, recursive = TRUE) | ||
## cannot use sprintf here | ||
essr_file <- file.path(root, paste('ESSRv', ver, '.rds', sep = '')) | ||
tryCatch({ | ||
if(ver < curver) { | ||
url <- paste('https://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) | ||
if(!file.exists(essr_file)) { | ||
url <- paste('https://github.com/emacs-ess/ESS/raw/ESSRv', ver, '/etc/ESSR.rds', sep = '') | ||
utils::download.file(url, essr_file) | ||
} | ||
load(envfile) | ||
ESSR <- readRDS(essr_file) | ||
attach(ESSR) | ||
print(TRUE) | ||
} , error = function(e) print(FALSE)) | ||
}, | ||
error = function(e) { | ||
print(e) | ||
print(FALSE) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.1 | ||
1.3 |