fix changelog version parse to work on windows

The CHANGELOG file, as a symlink, cannot be read on windows. So read
debian/changelog. Also, newline compat.
This commit is contained in:
Joey Hess 2013-05-10 15:26:53 -05:00
parent 258af9c6da
commit 524ffd1e68

4
Build/Configure.hs Normal file → Executable file
View file

@ -109,8 +109,8 @@ getVersion = do
getChangelogVersion :: IO String
getChangelogVersion = do
changelog <- readFile "CHANGELOG"
let verline = head $ lines changelog
changelog <- readFile "debian/changelog"
let verline = takeWhile (/= '\n') changelog
return $ middle (words verline !! 1)
where
middle = drop 1 . init