]> git.donarmstrong.com Git - cran2deb.git/commitdiff
remove debian/ directory when repacking
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Thu, 16 Apr 2009 21:28:40 +0000 (21:28 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Thu, 16 Apr 2009 21:28:40 +0000 (21:28 +0000)
git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@223 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

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)