Skip to content

Commit

Permalink
Compressed / simplified option parsing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jan 29, 2009
1 parent 5b52668 commit 5a9ea0d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Gitit.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ sessionTime = 60 * 60 -- session will expire 1 hour after page request


main :: IO () main :: IO ()
main = do main = do
argv <- getArgs conf <- getArgs >>= parseArgs >>= foldM handleFlag defaultConfig
options <- parseArgs argv
conf <- foldM handleFlag defaultConfig options
-- check for external programs that are needed -- check for external programs that are needed
let prereqs = "grep" : case repository conf of let prereqs = "grep" : case repository conf of
Git _ -> ["git"] Git _ -> ["git"]
Expand Down

0 comments on commit 5a9ea0d

Please sign in to comment.