@@ -68,9 +68,9 @@ make_proof <- function(id, share_path = file.path("..", "share"), exec=FALSE) {
6868 old <- setwd(get_articles_path())
6969 on.exit(setwd(old ))
7070 dir <- issue_dir(id )
71- if (! file.exists(dir )) {
71+ if (! file.exists(file.path( dir , " news " ) )) {
7272 # stop("Proof ", id, " already exists")
73- dir.create (dir )
73+ xfun :: dir_create(file.path (dir , " news " ) )
7474 }
7575
7676 prev_id <- previous_id(id )
@@ -79,20 +79,8 @@ make_proof <- function(id, share_path = file.path("..", "share"), exec=FALSE) {
7979 # file.copy(file.path(prev_dir, inherited_files), dir)
8080 # file.copy(file.path(share_path, "RJournal.sty"), dir)
8181
82- issue_file <- issue_file(id )
83- # file.copy(file.path(share_path, "RJournal_template.tex"), issue_file)
84- issue <- read_tex(issue_file )
85-
86- number <- issue_number(id )
87- if (number == 1L ) {
88- issue $ volume <- issue $ volume + 1L
89- }
90- issue $ volnum <- number
91- issue $ year <- issue_year(id )
92- issue $ month <- issue_month(id )
93-
9482 arts <- accepted_articles()
95- ready <- filter_status(arts , " online " )
83+ ready <- filter_status(arts , " proofed " )
9684 for (art in ready ) {
9785 if (exec ) {
9886 system(paste(
@@ -108,11 +96,11 @@ make_proof <- function(id, share_path = file.path("..", "share"), exec=FALSE) {
10896 news <- news_articles(id )
10997 for (art in news ) {
11098 if (exec ) {
111- system(paste (
112- " git mv " ,
113- shQuote( art ),
114- shQuote(file.path( dir , " news " , basename( art )))
115- ))
99+ file.copy (
100+ art ,
101+ file.path( dir , " news " ),
102+ recursive = TRUE
103+ )
116104 } else {
117105 cat(art , file.path(dir , " news" , basename(art )), " \n " )
118106 }
0 commit comments