version number code cleanup

This commit is contained in:
Simon Michael 2009-12-10 22:43:14 +00:00
parent 9b6f5e26d0
commit fd789f8440

View File

@ -45,7 +45,7 @@ binaryfilename = prettify $ splitAtElement '.' buildversion :: String
versionstr = prettify $ splitAtElement '.' buildversion :: String
where
prettify (major:minor:bugfix:patches:[]) =
printf "%s.%s%s%s%s" major minor bugfix' patches' desc
printf "%s.%s%s%s" major minor bugfix' patches'
where
bugfix'
| bugfix `elem` ["0"{-,"98","99"-}] = ""
@ -53,10 +53,6 @@ versionstr = prettify $ splitAtElement '.' buildversion :: String
patches'
| patches/="0" = "+"++patches++" patches"
| otherwise = ""
desc
-- | bugfix=="98" = " (alpha)"
-- | bugfix=="99" = " (beta)"
| otherwise = ""
prettify s = intercalate "." s
versionmsg = progname ++ "-" ++ versionstr ++ configmsg :: String