]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/getrpkg.R
remove debian/ directory when repacking
[cran2deb.git] / trunk / R / getrpkg.R
index f60329af58e7aca9529a9217d1b652ff7e103aeb..0c2e48b14aecd274f02aec4a4591dbb850f163ac 100644 (file)
@@ -100,6 +100,10 @@ repack_pkg <- function(pkg) {
                 ,'-type f -a '
                 ,   '! \\( -name configure -o -name cleanup \\)'
                 ,'-exec chmod -x {} \\;')
+    if (file.exists(file.path(basename(pkg$path),'debian'))) {
+        warn('debian/ directory found in tarball! removing...')
+        unlink(file.path(basename(pkg$path),'debian'),recursive=TRUE)
+    }
     # tar it all back up
     log_system('tar -czf',shQuote(debarchive),shQuote(basename(pkg$path)))
     setwd(wd)