Commit 63bbebfd authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add copyDirectory to Rules.Actions.

See #98.
parent 44fd16db
{-# LANGUAGE RecordWildCards #-}
module Rules.Actions (
build, buildWithResources, copyFile, createDirectory, removeDirectory,
moveDirectory, fixFile, runConfigure, runMake, runMakeVerbose, applyPatch,
renderLibrary, renderProgram, runBuilder, makeExecutable
copyDirectory, moveDirectory, applyPatch, fixFile, runConfigure, runMake,
runMakeVerbose, renderLibrary, renderProgram, runBuilder, makeExecutable
) where
import qualified System.Directory as IO
......@@ -81,6 +81,12 @@ removeDirectory dir = do
putBuild $ "| Remove directory " ++ dir
removeDirectoryIfExists dir
-- Note, the source directory is untracked
copyDirectory :: FilePath -> FilePath -> Action ()
copyDirectory source target = do
putProgressInfo $ renderAction "Copy directory" source target
quietly $ cmd (EchoStdout False) ["cp", "-r", source, target]
-- Note, the source directory is untracked
moveDirectory :: FilePath -> FilePath -> Action ()
moveDirectory source target = do
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment