factor out common imports
no code changes
This commit is contained in:
parent
003a604a6e
commit
8ef2095fa0
83 changed files with 264 additions and 619 deletions
|
@ -5,7 +5,7 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Utility.CopyFile (copyFile) where
|
||||
module Utility.CopyFile (copyFileExternal) where
|
||||
|
||||
import System.Directory (doesFileExist, removeFile)
|
||||
|
||||
|
@ -15,8 +15,8 @@ import qualified Build.SysConfig as SysConfig
|
|||
|
||||
{- The cp command is used, because I hate reinventing the wheel,
|
||||
- and because this allows easy access to features like cp --reflink. -}
|
||||
copyFile :: FilePath -> FilePath -> IO Bool
|
||||
copyFile src dest = do
|
||||
copyFileExternal :: FilePath -> FilePath -> IO Bool
|
||||
copyFileExternal src dest = do
|
||||
whenM (doesFileExist dest) $
|
||||
removeFile dest
|
||||
boolSystem "cp" [params, File src, File dest]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue