Permalink
Browse files

remote-repo -> local-repo

  • Loading branch information...
1 parent 8d2d61b commit d543e5ec68c44d9793d2800cc772997d608fec4f @snoyberg snoyberg committed Nov 29, 2011
Showing with 9 additions and 5 deletions.
  1. +8 −4 cabal-src-install.hs
  2. +1 −1 cabal-src.cabal
View
@@ -61,11 +61,15 @@ addToDB name ver = do
createDirectoryIfMissing True dir
let filename = concat [name, "-", ver, ".tar.gz"]
copyFile ("dist/" ++ filename) (dir ++ filename)
- fixConfig $ cabal ++ "/config"
+ fixConfig pd $ cabal ++ "/config"
-fixConfig fn = do
- ls <- lines <$> readFile fn
- let s = "remote-repo: cabal-src:http://www.haskell.org/"
+fixConfig pd fn = do
+ ls' <- lines <$> readFile fn
+ let oldLines =
+ [ "remote-repo: cabal-src:http://www.haskell.org/"
+ ]
+ let s = "local-repo: " ++ pd
+ let ls = filter (not . flip elem oldLines) ls'
unless (s `elem` ls) $ writeFile fn $ unlines $ addRepo s ls
addRepo s [] = [s]
View
@@ -1,5 +1,5 @@
Name: cabal-src
-Version: 0.1
+Version: 0.2
Synopsis: Alternative install procedure to avoid the diamond dependency issue.
Description: Please see the README.md file on Github for more information: <https://github.com/yesodweb/cabal-src/blob/master/README.md>.
License: BSD3

0 comments on commit d543e5e

Please sign in to comment.