diff options
author | defanor <defanor@uberspace.net> | 2017-11-20 01:55:15 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-20 01:55:15 +0300 |
commit | e2936f8773bf7d84d493020bfe2fab1d8d7f3819 (patch) | |
tree | 469898a18cb1dcf67ee5b2a352062c511de17bfe /Setup.hs | |
parent | 11267e6ce7c3c577fa36d45c0103a988dc759eba (diff) |
Create man directory if it doesn't exist
It may be missing when destdir is altered to prepare a binary release.
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,6 +4,7 @@ import Distribution.Simple.Utils import Distribution.PackageDescription import Distribution.Simple.Setup import System.FilePath +import System.Directory main = defaultMainWithHooks simpleUserHooks { postCopy = installManPage } @@ -12,9 +13,10 @@ installManPage :: Args -> PackageDescription -> LocalBuildInfo -> IO () -installManPage _ cf pd lbi = +installManPage _ cf pd lbi = do let dirs = absoluteInstallDirs pd lbi (fromFlag $ copyDest cf) man1 = mandir dirs </> "man1" fname = "pancake.1" target = man1 </> fname - in installOrdinaryFile (fromFlag $ copyVerbosity cf) fname target + createDirectoryIfMissing True man1 + installOrdinaryFile (fromFlag $ copyVerbosity cf) fname target |