From 4142b65a86b951c2d6a3e955105d60d62099fcc0 Mon Sep 17 00:00:00 2001 From: Bill Ewanick Date: Sun, 16 Apr 2023 15:14:01 -0400 Subject: [PATCH] Only replace blog posts if not there --- generateSealPosts.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generateSealPosts.hs b/generateSealPosts.hs index 12a70c9..4755eec 100755 --- a/generateSealPosts.hs +++ b/generateSealPosts.hs @@ -126,9 +126,8 @@ allBlogPosts config = map f zippedDates writeToFile :: Config -> (FilePath, Text) -> IO() writeToFile config (fp, txt) = do - -- fileExists <- doesFileExist fp' - -- unless fileExists (write fp' txt) - write fp' txt + fileExists <- doesFileExist fp' + unless fileExists (write fp' txt) where write = TIO.writeFile fp' = postsOutputPath config <> "/" <> fp