Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Created November 25, 2014 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nassimhaddad/d0efdfeddf06dda00f87 to your computer and use it in GitHub Desktop.
Save nassimhaddad/d0efdfeddf06dda00f87 to your computer and use it in GitHub Desktop.
Scripts that build and checks packages (source: https://github.com/jwijffels/ETLUtils)
#!/bin/bash
echo "Removing building information..."
rm -rf output
echo "Generate documentation..."
R -q -f roxygen.R
mkdir output
cd output
R CMD build --resave-data ../pkg
for x in *.tar.gz
do
R CMD check --as-cran $x
done
@echo off
echo Removing building information...
rm -rf output
echo Generate documentation...
Rscript roxygen.R
md output
cd output
R CMD build --resave-data ../pkg
FOR %%1 in (*.tar.gz) DO R CMD check --as-cran %%1
cd ..
library(methods)
library(utils)
library(roxygen2)
options(error=traceback)
unlink( 'pkg/man', TRUE)
setwd('pkg')
roxygenize('.', clean = TRUE)
if (length(list.files('inst/doc')) == 0){
unlink( 'inst/doc', TRUE)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment