Helper setup scripts for packaging command-line tools.
root
cli-setup
Example use taken from madlang's Setup.hs
file:
import Distribution.CommandLine
import Distribution.Simple
main :: IO ()
main = setManpath *>
writeManpages "man/madlang.1" "madlang.1" *>
writeBashCompletions "madlang" *>
defaultMain
Be sure to add man/madlang.1
(or whatever the path to your source file is) to your .cabal
file's extra-source-files
field.