Skip to content
Snippets Groups Projects
Commit d55df622 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent 3ec9bc1b
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
'install_friendlyr
Usage:
install_friendlyr.R -version <version> -path <path>
install_friendlyr.R -branch <branch> -rpath <rpath>
install_friendlyr.R (-h | --help)
install_friendlyr.R --version
......@@ -17,7 +17,7 @@ Options:
--version Show version.
Outcomes:
friendlyr: package friendlyr install with the chosen version.
friendlyr: package friendlyr installed with the chosen version.
' -> doc
......@@ -28,24 +28,24 @@ arguments <- docopt::docopt(doc, version = 'install_friendlyr version 0.0.1')
cat("Initialising parameters... \n")
# init parameters
version <- tryCatch({
res <- as.character(arguments$version)
branch <- tryCatch({
res <- as.character(arguments$branch)
res
}, error = function(err) {
print(paste("Error in argument 'version': ",err))
print(paste("Error in argument 'branch': ",err))
print("It will crash.")
})
# get path
path <- tryCatch({
res <- normalizePath(file.path(as.character(arguments$path)),mustWork = FALSE)
rpath <- tryCatch({
res <- normalizePath(file.path(as.character(arguments$rpath)),mustWork = FALSE)
res
}, error = function(err) {
print(paste("Error in argument 'result': ",err))
print(paste("Error in argument 'rpath': ",err))
print("It will crash.")
})
cat("Installation... \n")
wd <- dirname(dirname(getwd()))
# install friendlyr
install.packages(file.path(path,paste0('friendlyr_',version,'.tar.gz')), repos=NULL, type='source')
install.packages(file.path(rpath,paste0('friendlyr_',branch,'.tar.gz')), repos=NULL, type='source')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment