use prefix in dependSingle'
This commit is contained in:
parent
d360121efd
commit
966481dacd
1 changed files with 9 additions and 8 deletions
|
@ -1,26 +1,27 @@
|
|||
module Depend where
|
||||
|
||||
import BuildVar
|
||||
import Info hiding (Text)
|
||||
import Data.Foldable
|
||||
import System.FilePath
|
||||
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Text.Lazy (Text)
|
||||
import Data.Text.Lazy.Builder (toLazyText)
|
||||
import BuildVar
|
||||
import System.FilePath
|
||||
|
||||
|
||||
dependSingle' :: FilePath -- ^ yaml file name (relative to data dir!)
|
||||
-> Info
|
||||
-> FilePath -- ^ output prefix
|
||||
-> FilePath -- ^ build dir
|
||||
-> Bool -- ^ include nsfw?
|
||||
-> Text
|
||||
dependSingle' yaml info build nsfw =
|
||||
let dir = build </> takeDirectory yaml
|
||||
dependSingle' yaml info prefix build nsfw =
|
||||
let dir = build </> prefix </> takeDirectory yaml
|
||||
images = if nsfw then #images info else filter #sfw $ #images info
|
||||
paths = map #path images
|
||||
index = dir </> "index.html"
|
||||
deps = map (dir </>) $
|
||||
thumbFile (thumbnail info) : map pageFile paths ++ paths
|
||||
deps' = unwords deps
|
||||
deps = thumbFile (thumbnail info) : map pageFile paths ++ paths
|
||||
deps' = unwords $ map (dir </>) deps
|
||||
in
|
||||
toLazyText [b|$@index: $@deps'|]
|
||||
|
||||
|
|
Loading…
Reference in a new issue