copy the content linked to

symlinks are hard (at least in current mental state and with the test
system being remote)
This commit is contained in:
Joey Hess 2019-10-17 12:41:02 -04:00
parent 9dff416a34
commit 96418dcd11
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -15,6 +15,7 @@ import System.FilePath
import System.Posix.Files
import Control.Monad
import Build.BundledPrograms
import qualified Data.ByteString.Lazy as L
import Utility.SafeCommand
import Utility.Process
@ -61,7 +62,7 @@ installGitLibs topdir = do
linktarget <- readSymbolicLink f
let linktarget' = gitcoredestdir </> "bin" </> takeFileName linktarget
createDirectoryIfMissing True (takeDirectory linktarget')
cp f linktarget'
L.readFile f >>= L.writeFile linktarget'
nukeFile destf
rellinktarget <- relPathDirToFile (takeDirectory destf) linktarget'
createSymbolicLink rellinktarget destf