diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-31 15:15:35 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-31 15:15:35 +0100 |
commit | e54834f4448f4bcc6fb55fb338ffcfd4390fd356 (patch) | |
tree | 6a3e0bb03ed73c82e11eb96caafb49bf6bd42af5 /src/Hakyll/Core/Run.hs | |
parent | 8bb4ea5c83fb96842f85d2d167e96c4eae09d4ea (diff) | |
download | hakyll-e54834f4448f4bcc6fb55fb338ffcfd4390fd356.tar.gz |
Check modification only once
Diffstat (limited to 'src/Hakyll/Core/Run.hs')
-rw-r--r-- | src/Hakyll/Core/Run.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs index 636f9e4..1b45f38 100644 --- a/src/Hakyll/Core/Run.hs +++ b/src/Hakyll/Core/Run.hs @@ -67,8 +67,15 @@ hakyllWith rules provider store = do where addTarget route' map' (id', comp) = do let url = runRoute route' id' + + -- Check if the resource was modified + modified <- if resourceExists provider id' + then resourceModified provider id' store + else return False + + -- Run the compiler compiled <- runCompilerJob comp id' provider (dependencyLookup map') - url store + url store modified putStrLn $ "Generated target: " ++ show id' case url of @@ -79,6 +86,7 @@ hakyllWith rules provider store = do makeDirectories path write path compiled + putStrLn "" return $ M.insert id' compiled map' dependencyLookup map' id' = case M.lookup id' map' of |