From e0205d4bb6760799c3aca719e3c8711828aff9d7 Mon Sep 17 00:00:00 2001 From: Lena Hersemann Date: Thu, 28 Mar 2019 18:23:13 +0100 Subject: [PATCH] added seconds to file timestamp; cosmetics --- tools/rendr/rend.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/rendr/rend.R b/tools/rendr/rend.R index 384ffb4..f2b2f2d 100755 --- a/tools/rendr/rend.R +++ b/tools/rendr/rend.R @@ -68,7 +68,7 @@ if(!file.exists(r_script)){ # check previous script versions script_name <- str_replace(basename(r_script), ".R", "") -current_script <- paste0(".", script_name, "_", format(Sys.time(), "%Y%m%d_%H%M.R")) +current_script <- paste0(".", script_name, "_", format(Sys.time(), "%Y%m%d_%H%M%S.R")) all_files <- file.info(list.files(".", pattern = paste0("\\.", script_name), all.files = T)) all_files <- all_files[str_detect(rownames(all_files), ".R$"),] @@ -84,7 +84,7 @@ diffFile(recent_script, r_script, mode = "sidebyside") if(row_diff > 0) { print("ATTENTION: the script has been changed") - cat("Would you like to overwrite the existing data? [Yes/No]") + cat("Would you like to overwrite the existing data? [Yes/No] ") inp <- readLines(file("stdin"), n = 1L) if (!inp == "Yes" & !inp %in% "No") { -- GitLab