Skip to content

Commit

Permalink
Fixes for R_HOME warning on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronbracken committed Nov 28, 2009
1 parent 06a5f40 commit 07e5651
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion exec/install-script.R
@@ -1,6 +1,8 @@
#!/usr/bin/env Rscript

options(warn=-1)
R_HOME <- Sys.getenv('R_HOME')
R_HOME <- ifelse(length(R_HOME) == 0, R.home(), R_HOME)
bindir <- paste(R.home(),"/bin",sep='')
bin_script <- file.path(bindir,'pgfsweave')
x <- file.remove(bin_script)
Expand Down Expand Up @@ -46,7 +48,7 @@ if(success){

cat('\n***********************\n')
cat('Failed to install custom pgfsweave script:\n')
cat(' Thats ok! You can manually install it wherever you want!\n')
cat(' Thats ok! You can manually install it later!\n')
cat('***********************\n')

}
Expand Down
2 changes: 2 additions & 0 deletions man/pgfSweave.Rd
Expand Up @@ -77,6 +77,7 @@ pgf manual externalization section: \url{http://sourceforge.net/projects/pgf/}
\examples{
\dontrun{vignette("pgfSweave")}

\dontrun{
library(pgfSweave)
oldcwd <- getwd()
dir <- tempdir()
Expand All @@ -85,6 +86,7 @@ file.copy(system.file("example","pgfSweave-example.Rnw", package = "pgfSweave"),
file <- file.path(dir,"pgfSweave-example.Rnw")
pgfSweave(file,compile.tex=FALSE)
setwd(oldcwd)
}

\dontrun{
## Normally to compile to PDF by
Expand Down
6 changes: 5 additions & 1 deletion src/Makevars
Expand Up @@ -3,4 +3,8 @@
all : cmdScript $(SHLIB)

cmdScript :
Rscript ../exec/install-script.R
ifdef R_HOME
${R_HOME}/bin/Rscript ../exec/install-script.R
else
(R_HOME=`R RHOME`; ${R_HOME}/bin/Rscript ../exec/install-script.R)
endif
5 changes: 4 additions & 1 deletion src/dummy.c
@@ -1,5 +1,8 @@

//Dummy file to avoid check warning about no source code
/*
Dummy file to avoid check warning about no source code
since all we are using is Makevars
*/
void dummy(){
return;
}

0 comments on commit 07e5651

Please sign in to comment.