diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-15 20:28:26 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-15 20:28:55 +0200 |
commit | 18fd9f5a0a1debe23bef4ba813143b886d586740 (patch) | |
tree | c93c12d0db28440ea22b54e06ade0ddd9f02b2e6 /html-test/accept.lhs | |
parent | 0007a5adc2460ec3bca4b86eda670a93bf91c3c3 (diff) |
Adapt accept.lhs, so that it ignores more index files
Diffstat (limited to 'html-test/accept.lhs')
-rwxr-xr-x | html-test/accept.lhs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/html-test/accept.lhs b/html-test/accept.lhs index 3dfc099b..ea55c35c 100755 --- a/html-test/accept.lhs +++ b/html-test/accept.lhs @@ -12,19 +12,19 @@ baseDir = takeDirectory __FILE__ main :: IO () main = do - contents <- filter (`notElem` ignore) <$> getDirectoryContents (baseDir </> "output") + contents <- filter (not . ignore) <$> getDirectoryContents (baseDir </> "output") args <- getArgs if not $ null args then mapM_ copy [ baseDir </> "output" </> file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ] else mapM_ copy [ baseDir </> "output" </> file | file <- contents] where - ignore = [ - "." - , ".." - , "doc-index.html" - , "index-frames.html" - , "index.html" + ignore = + foldr (liftA2 (||)) (const False) [ + (== ".") + , (== "..") + , (isPrefixOf "index") + , (isPrefixOf "doc-index") ] copy :: FilePath -> IO () |