diff options
author | 2012-04-14 14:01:14 -0400 | |
---|---|---|
committer | 2012-04-14 14:01:14 -0400 | |
commit | 1ca41044e8fab2b2e859a482e2293582c04db81f (patch) | |
tree | 1fee3a4d4498f0ba95ec9c26dd127ab422768d3d /Setup.hs | |
parent | 142bde13cd33481f415a5355a9cd9e74a716e3a8 (diff) |
cabal now installs git-annex-shell as a symlink to git-annex.
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,12 +1,27 @@ {- cabal setup file -} import Distribution.Simple +import Distribution.Simple.LocalBuildInfo +import Distribution.Simple.Setup import System.Cmd +import System.FilePath import qualified Build.Configure as Configure -main = defaultMainWithHooks simpleUserHooks { preConf = configure } +main = defaultMainWithHooks simpleUserHooks + { preConf = configure + , instHook = install + } configure _ _ = do Configure.run Configure.tests return (Nothing, []) + +install pkg_descr lbi userhooks flags = do + r <- (instHook simpleUserHooks) pkg_descr lbi userhooks flags + _ <- rawSystem "ln" ["-sf", "git-annex", + bindir installDirs </> "git-annex-shell"] + return r + where + installDirs = absoluteInstallDirs pkg_descr lbi $ + fromFlag (copyDest defaultCopyFlags) |