blob: d19dff7b4cbb6144d04b26790399ae3efba2a203 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import System.Cmd
import System.Environment
import System.FilePath
import System.Exit
import System.Directory
import Data.List
import Control.Monad
main = do
args <- getArgs
dir <- getCurrentDirectory
contents <- getDirectoryContents (dir </> "output")
if not $ null args
then
mapM copy [ "output" </> file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ]
else
mapM copy [ "output" </> file | file <- contents, ".html" `isSuffixOf` file ]
copy file = do
let new = "tests" </> takeFileName file <.> ".ref"
print file
print new
copyFile file ("tests" </> takeFileName file <.> ".ref")
|