bluetile 0.5.1 → 0.5.2
raw patch · 2 files changed
+10/−3 lines, 2 filessetup-changed
Files
- Setup.lhs +9/−2
- bluetile.cabal +1/−1
Setup.lhs view
@@ -7,7 +7,7 @@ > import System.Directory > import System.IO > import Control.Monad-> import Text.Regex+> import Data.List > > main = defaultMainWithHooks (simpleUserHooks { postCopy = myPostCopy, postInst = myPostInst } ) >@@ -39,8 +39,15 @@ > let userConfigTemplate = datadir copyDirs </> "etc" </> "bluetilerc_user_template" > let pathToSystemConfig = datadir installDirs </> "etc" </> "bluetilerc" > contents <- readFileStrict userConfigTemplate-> let contentsPatched = subRegex (mkRegex "__PATH_TO_BLUETILERC__") contents pathToSystemConfig+> let contentsPatched = replaceStr "__PATH_TO_BLUETILERC__" pathToSystemConfig contents > writeFile userConfigTemplate contentsPatched+>+> replaceStr :: (Eq a) => [a] -> [a] -> [a] -> [a]+> replaceStr _ _ [] = []+> replaceStr old new xs@(y:ys) =+> case stripPrefix old xs of+> Nothing -> y : replaceStr old new ys+> Just ys' -> new ++ replaceStr old new ys' > > -- taken from System.IO.Strict on Hackage > readFileStrict :: FilePath -> IO String
bluetile.cabal view
@@ -1,5 +1,5 @@ Name: bluetile-Version: 0.5.1+Version: 0.5.2 homepage: http://www.bluetile.org/ synopsis: full-featured tiling for the GNOME desktop environment description: