Skip to content

Commit

Permalink
Support logging builds to a local file, instead of hacking it
Browse files Browse the repository at this point in the history
  • Loading branch information
donsbot committed Jan 18, 2010
1 parent 4019ffe commit 42e8873
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,22 @@ main =
die "Unable to tar package"
Right _ -> putStrLn ("Created " ++ (cwd </> dir <.> "tar.gz"))

-- RSS generation help
writeFile "title" (arch_pkgname pkgbuild ++ "-" ++ (render . disp $ arch_pkgver pkgbuild))
writeFile "desc" (show $ arch_pkgdesc pkgbuild)
writeFile "link" (show $ arch_url pkgbuild)
-- If the user created a .cabal2arch.log file, append log results there.
mh <- getEnvMaybe "HOME"
case mh of
Nothing -> return ()
Just home -> do
b <- doesFileExist $ home </> ".cabal2arch.log"
if not b
then return ()
else do

-- Log to build file.
appendFile (home </> ".cabal2arch.log") $ (show $ (,,)

(arch_pkgname pkgbuild ++ "-" ++ (render . disp $ arch_pkgver pkgbuild))
(arch_pkgdesc pkgbuild)
(arch_url pkgbuild)) ++ "\n"

------------------------------------------------------------------------

Expand Down

0 comments on commit 42e8873

Please sign in to comment.