Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
63bbebfd
Commit
63bbebfd
authored
Feb 07, 2016
by
Andrey Mokhov
Browse files
Add copyDirectory to Rules.Actions.
See
#98
.
parent
44fd16db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Rules/Actions.hs
View file @
63bbebfd
{-# 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment