[Roxygen-commits] r153 - in pkg: . R src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 3 21:56:11 CEST 2008


Author: pcd
Date: 2008-08-03 21:56:11 +0200 (Sun, 03 Aug 2008)
New Revision: 153

Added:
   pkg/src/
   pkg/src/Makefile
   pkg/src/roxygen
Modified:
   pkg/R/roxygenize.R
Log:
Makefile hack for installing roxygen script (untested)


Modified: pkg/R/roxygenize.R
===================================================================
--- pkg/R/roxygenize.R	2008-08-03 19:56:09 UTC (rev 152)
+++ pkg/R/roxygenize.R	2008-08-03 19:56:11 UTC (rev 153)
@@ -42,7 +42,10 @@
                      verbose=FALSE) {
   if (unlink.target)
     unlink(target, recursive=TRUE)
-  files <- list.files(source, full.name=TRUE, recursive=TRUE)
+  files <- list.files(source,
+                      full.name=TRUE,
+                      recursive=TRUE,
+                      all.files=TRUE)
   for (source.file in files) {
     promoted.file <- sub('[^/\\]*(/|\\\\)', '', source.file)
     target.file <- file.path(target, promoted.file)
@@ -87,7 +90,11 @@
 
   for (dir in skeleton) dir.create(dir, showWarnings=FALSE)
   r.dir <- file.path(package.dir, R.DIR)
-  files <- as.list(list.files(r.dir, recursive=TRUE, full.names=TRUE))
+  files <- as.list(list.files(r.dir,
+                              pattern='\\.(R|r)$',
+                              recursive=TRUE,
+                              full.names=TRUE,
+                              all.files=TRUE))
   Rd <- make.Rd.roclet(man.dir)
   do.call(Rd$parse, files)
   namespace <- make.namespace.roclet(namespace.file)

Added: pkg/src/Makefile
===================================================================
--- pkg/src/Makefile	                        (rev 0)
+++ pkg/src/Makefile	2008-08-03 19:56:11 UTC (rev 153)
@@ -0,0 +1,6 @@
+all:
+	echo > empty.so && \
+	install -v roxygen $(R_HOME)/bin || \
+	true
+
+clean:

Added: pkg/src/roxygen
===================================================================
--- pkg/src/roxygen	                        (rev 0)
+++ pkg/src/roxygen	2008-08-03 19:56:11 UTC (rev 153)
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+usage="Usage: R CMD roxygen PACKAGE
+
+A simple front-end for roxygenize()
+
+Options:
+  -h, --help    print short help message and exit
+  -v, --version print roxygen version info and exit
+
+Report bugs to <roxygen-devel at lists.r-forge.r-project.org>."
+
+case ${1} in
+    -h|--help)
+        echo "${usage}"; exit 0 ;;
+    -v|--version)
+        echo "${version}"; exit 0 ;;
+esac
+
+R_EXE="${R_HOME}/bin/R"
+echo "library(roxygen); roxygenize('${1}')" | \
+    "${R_EXE}" --no-restore --slave


Property changes on: pkg/src/roxygen
___________________________________________________________________
Name: svn:executable
   + *



More information about the Roxygen-commits mailing list