diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-09 12:35:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-09 12:35:50 -0400 |
commit | e30ac23d6895f8fb4320b58d855be74a778d2b87 (patch) | |
tree | e0bb5ad631abc6c589f34cf169246a25a4667867 /Build/OSXMkLibs.hs | |
parent | 74d93bfad4504bf31d946df509737f9028d506df (diff) |
reverse symlinks
Diffstat (limited to 'Build/OSXMkLibs.hs')
-rw-r--r-- | Build/OSXMkLibs.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs index 7c15e9451..ba4490f6d 100644 --- a/Build/OSXMkLibs.hs +++ b/Build/OSXMkLibs.hs @@ -42,16 +42,16 @@ installLibs appbase libmap = do (needlibs, libmap') <- otool appbase libmap libs <- forM needlibs $ \lib -> do let shortlib = fromMaybe (error "internal") (M.lookup lib libmap') - let dest = appbase </> shortlib - let symdest = appbase </> takeFileName lib + let dest = appbase </> takeFileName lib + let symdest = appbase </> shortlib ifM (doesFileExist dest) ( return Nothing , do createDirectoryIfMissing True appbase - putStrLn $ "installing " ++ lib ++ " as " ++ dest + putStrLn $ "installing " ++ lib ++ " as " ++ shortlib _ <- boolSystem "cp" [File lib, File dest] _ <- boolSystem "chmod" [Param "644", File dest] - _ <- boolSystem "ln" [Param "-s", File shortlib, File symdest] + _ <- boolSystem "ln" [Param "-s", File (takeFileName lib), File symdest] return $ Just appbase ) return (catMaybes libs, libmap') |