Commit a9d1f36a authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent d55df622
......@@ -3,14 +3,14 @@
# Jean-Marie Lepioufle
# NILU - nilu.no
# 2020-08-14
# install friendlyr
# install
'install_friendlyr
'install
Usage:
install_friendlyr.R -branch <branch> -rpath <rpath>
install_friendlyr.R (-h | --help)
install_friendlyr.R --version
install.R pkg <pkg> branch <branch> dir <dir>
install.R (-h | --help)
install.R --version
Options:
-h --help Show this screen.
......@@ -23,11 +23,17 @@ Outcomes:
#library(docopt)
arguments <- docopt::docopt(doc, version = 'install_friendlyr version 0.0.1')
arguments <- docopt::docopt(doc, version = 'install version 0.0.1')
cat("Initialising parameters... \n")
# arguments
pkg <- tryCatch({
res <- as.character(arguments$pkg)
res
}, error = function(err) {
print(paste("Error in argument 'pkg': ",err))
print("It will crash.")
})
# init parameters
branch <- tryCatch({
res <- as.character(arguments$branch)
res
......@@ -36,16 +42,14 @@ branch <- tryCatch({
print("It will crash.")
})
# get path
rpath <- tryCatch({
res <- normalizePath(file.path(as.character(arguments$rpath)),mustWork = FALSE)
dir <- tryCatch({
res <- normalizePath(file.path(as.character(arguments$dir)),mustWork = FALSE)
res
}, error = function(err) {
print(paste("Error in argument 'rpath': ",err))
print(paste("Error in argument 'dir': ",err))
print("It will crash.")
})
cat("Installation... \n")
# install pkg
wd <- dirname(dirname(getwd()))
# install friendlyr
install.packages(file.path(rpath,paste0('friendlyr_',branch,'.tar.gz')), repos=NULL, type='source')
install.packages(file.path(dir,paste0(pkg,'-',branch,'.tar.gz')), repos=NULL, type='source')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment