|
17 | 17 | # You should have received a copy of the GNU General Public License |
18 | 18 | # along with Rcpp. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
|
| 20 | +## local copy til pkgKitten is updated on CRAN |
| 21 | +.pkgKittenPlayWithPerPackageHelpPage <- function(name = "anRpackage", |
| 22 | + path = ".", |
| 23 | + maintainer = "Your Name", |
| 24 | + |
| 25 | + root <- file.path(path, name) |
| 26 | + helptgt <- file.path(root, "man", sprintf( "%s-package.Rd", name)) |
| 27 | + helpsrc <- system.file("replacements", "manual-page-stub.Rd", package="pkgKitten") |
| 28 | + ## update the package description help page |
| 29 | + if (file.exists(helpsrc)) { |
| 30 | + lines <- readLines(helpsrc) |
| 31 | + lines <- gsub("__placeholder__", name, lines, fixed = TRUE) |
| 32 | + lines <- gsub( "Who to complain to <[email protected]>", |
| 33 | + sprintf( "%s <%s>", maintainer, email), |
| 34 | + lines, fixed = TRUE) |
| 35 | + writeLines(lines, helptgt) |
| 36 | + } |
| 37 | + invisible(NULL) |
| 38 | +} |
| 39 | + |
| 40 | + |
20 | 41 | Rcpp.package.skeleton <- function(name = "anRpackage", list = character(), |
21 | 42 | environment = .GlobalEnv, |
22 | 43 | path = ".", force = FALSE, |
@@ -120,7 +141,8 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(), |
120 | 141 |
|
121 | 142 | ## update the package description help page |
122 | 143 | if (havePkgKitten) { # if pkgKitten is available, use it |
123 | | - pkgKitten::playWithPerPackageHelpPage(name, path, maintainer, email) |
| 144 | + #pkgKitten::playWithPerPackageHelpPage(name, path, maintainer, email) |
| 145 | + .pkgKittenPlayWithPerPackageHelpPage(name, path, maintainer, email) |
124 | 146 | } else { |
125 | 147 | package_help_page <- file.path(root, "man", sprintf( "%s-package.Rd", name)) |
126 | 148 | if (file.exists(package_help_page)) { |
|
0 commit comments