diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-15 12:11:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-15 12:11:27 -0400 |
commit | 1c7360c01fa602541856b90ef6c308a9d4e2d3b0 (patch) | |
tree | 20e992922d56f81de8cdf54464a3211e820ea85a /Build/EvilSplicer.hs | |
parent | 79a5475b54295d5b44b93b888bb823015ede8756 (diff) |
only show files that are really changed
Diffstat (limited to 'Build/EvilSplicer.hs')
-rw-r--r-- | Build/EvilSplicer.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs index 66032bad7..6fef646ae 100644 --- a/Build/EvilSplicer.hs +++ b/Build/EvilSplicer.hs @@ -197,14 +197,14 @@ applySplices :: FilePath -> Maybe String -> [Splice] -> IO () applySplices destdir imports splices@(first:_) = do let f = splicedFile first let dest = (destdir </> f) - putStrLn $ "splicing " ++ f lls <- map (++ "\n") . lines <$> readFileStrict f createDirectoryIfMissing True (parentDir dest) let newcontent = concat $ addimports $ expanddeclarations declarationsplices $ expandexpressions lls expressionsplices oldcontent <- catchMaybeIO $ readFileStrict dest - when (oldcontent /= Just newcontent) $ + when (oldcontent /= Just newcontent) $ do + putStrLn $ "splicing " ++ f writeFile dest newcontent where (expressionsplices, declarationsplices) = |