I want to use shake for regression testing and I have to set up the test directory. I would like to copy a directory with fonts into the test directory and included a need
on the target directory and then copy the files but my code gives the error:
Probably due to calling 'need' on a directory. Shake only permits 'need' on files.
I tried to get needs
on the single files, but do not succeed. I have
fontFiles1 <- getDirectoryFiles (templatesD</>"et-book" ) ["/**/*"]
need $ map (\f -> staticD</>"et-book"</>f) fontFiles1
and then :
(staticD</>"et-book/**") %> \out ->
copyFileChanged (replaceDirectory out (templatesD</>"et-book")) out
but this does not include all the subdirectories under et-book
.
What is the right way to do this? Should I just copy all directory content over (with e.g. System.Path from fsutils)?