Commit 6882787d authored by Lautaro Emanuel's avatar Lautaro Emanuel Committed by Oleg Grenrus

Installing (copy or symlink) executable message prints destination.

parent 3d93cdd7
......@@ -835,24 +835,26 @@ installBuiltExe
installBuiltExe verbosity overwritePolicy
sourceDir exeName finalExeName
installdir InstallMethodSymlink = do
notice verbosity $ "Symlinking '" <> exeName <> "'"
notice verbosity $ "Symlinking '" <> exeName <> "' to '" <> destination <> "'"
symlinkBinary
overwritePolicy
installdir
sourceDir
finalExeName
exeName
where
destination = installdir </> finalExeName
installBuiltExe verbosity overwritePolicy
sourceDir exeName finalExeName
installdir InstallMethodCopy = do
notice verbosity $ "Copying '" <> exeName <> "'"
notice verbosity $ "Copying '" <> exeName <> "' to '" <> destination <> "'"
exists <- doesPathExist destination
case (exists, overwritePolicy) of
(True , NeverOverwrite ) -> pure False
(True , AlwaysOverwrite) -> remove >> copy
(False, _ ) -> copy
where
source = sourceDir </> exeName
source = sourceDir </> exeName
destination = installdir </> finalExeName
remove = do
isDir <- doesDirectoryExist destination
......
......@@ -186,6 +186,10 @@ symlinkBinaries platform comp overwritePolicy
cinfo = compilerInfo comp
(CompilerId compilerFlavor _) = compilerInfoId cinfo
-- | Symlink binary.
--
-- The paths are take in pieces, so we can make relative link when possible.
--
symlinkBinary ::
OverwritePolicy -- ^ Whether to force overwrite an existing file
-> FilePath -- ^ The canonical path of the public bin dir eg
......
Markdown is supported
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