From 1ca41044e8fab2b2e859a482e2293582c04db81f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 14 Apr 2012 14:01:14 -0400 Subject: [PATCH] cabal now installs git-annex-shell as a symlink to git-annex. --- Setup.hs | 17 ++++++++++++++++- debian/changelog | 1 + git-annex-shell.hs | 13 ------------- git-annex.cabal | 4 ---- 4 files changed, 17 insertions(+), 18 deletions(-) delete mode 100644 git-annex-shell.hs diff --git a/Setup.hs b/Setup.hs index 14e6a4ea71..c36d6e4fe1 100644 --- a/Setup.hs +++ b/Setup.hs @@ -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) diff --git a/debian/changelog b/debian/changelog index abc3ae5120..73b4f31b08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ git-annex (3.20120407) UNRELEASED; urgency=low Damerau-Levenshtein edit distance, just as git does. This adds a build dependency on the haskell edit-distance library. * Renamed diskfree.c to avoid OSX case insensativity bug. + * cabal now installs git-annex-shell as a symlink to git-annex. -- Joey Hess Sun, 08 Apr 2012 12:23:42 -0400 diff --git a/git-annex-shell.hs b/git-annex-shell.hs deleted file mode 100644 index 08c1f9664d..0000000000 --- a/git-annex-shell.hs +++ /dev/null @@ -1,13 +0,0 @@ -{- git-annex-shell main program - - - - Copyright 2012 Joey Hess - - - - Licensed under the GNU GPL version 3 or higher. - -} - -import System.Environment - -import GitAnnexShell - -main :: IO () -main = run =<< getArgs diff --git a/git-annex.cabal b/git-annex.cabal index df40011895..6b1ebb42e6 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -36,10 +36,6 @@ Executable git-annex Other-Modules: Utility.Touch C-Sources: Utility/libdiskfree.c -Executable git-annex-shell - Main-Is: git-annex-shell.hs - C-Sources: Utility/libdiskfree.c - Test-Suite test Type: exitcode-stdio-1.0 Main-Is: test.hs