diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-31 11:34:09 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-31 11:34:09 -0400 |
commit | b5e3a66333d10d703385c807deb26d6789ea28cc (patch) | |
tree | 7f298f858ce59a9e72e3031a997d5e73e97e1313 /Setup.hs | |
parent | 3207518c9f6a70e6e9d449493ae0fad877987e03 (diff) |
response
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -13,6 +13,7 @@ import System.FilePath import Control.Applicative import Control.Monad import System.Directory +import Data.List import qualified Build.DesktopFile as DesktopFile import qualified Build.Configure as Configure @@ -51,10 +52,14 @@ installManpages copyDest verbosity pkg lbi = installOrdinaryFiles verbosity dstManDir =<< srcManpages where dstManDir = mandir (absoluteInstallDirs pkg lbi copyDest) </> "man1" - srcManpages = zip (repeat srcManDir) - <$> filterM doesFileExist manpages - srcManDir = "" - manpages = ["git-annex.1", "git-annex-shell.1"] + srcManpages = do + havemans <- doesDirectoryExist srcManDir + if havemans + then zip (repeat srcManDir) + . filter (".1" `isSuffixOf`) + <$> getDirectoryContents srcManDir + else return [] + srcManDir = "man" installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installDesktopFile copyDest _verbosity pkg lbi = |