summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-14 14:01:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-14 14:01:14 -0400
commit1ca41044e8fab2b2e859a482e2293582c04db81f (patch)
tree1fee3a4d4498f0ba95ec9c26dd127ab422768d3d
parent142bde13cd33481f415a5355a9cd9e74a716e3a8 (diff)
cabal now installs git-annex-shell as a symlink to git-annex.
-rw-r--r--Setup.hs17
-rw-r--r--debian/changelog1
-rw-r--r--git-annex-shell.hs13
-rw-r--r--git-annex.cabal4
4 files changed, 17 insertions, 18 deletions
diff --git a/Setup.hs b/Setup.hs
index 14e6a4ea7..c36d6e4fe 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 abc3ae512..73b4f31b0 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 <joeyh@debian.org> 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 08c1f9664..000000000
--- a/git-annex-shell.hs
+++ /dev/null
@@ -1,13 +0,0 @@
-{- git-annex-shell main program
- -
- - Copyright 2012 Joey Hess <joey@kitenet.net>
- -
- - 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 df4001189..6b1ebb42e 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