Skip to content
Snippets Groups Projects
Commit baf4fbb5 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-06-20 11:03:55 by simonmar]

- print the version number as x.yy.z (i.e. replace ", patchlevel z"
with ".z"), but omit the .z if z == 0.

- add --numeric-version flag which prints x.yy.z without the verbage.
parent 6f7209bd
No related merge requests found
......@@ -70,6 +70,11 @@ long_usage = do
dump ('$':'$':s) = hPutStr stderr get_prog_name >> dump s
dump (c:s) = hPutChar stderr c >> dump s
version_str = _ProjectVersion ++
( if _ProjectPatchLevel /= "0" && _ProjectPatchLevel /= ""
then '.':_ProjectPatchLevel
else "")
-----------------------------------------------------------------------------
-- Phases
......@@ -1609,10 +1614,11 @@ opts =
------- version ----------------------------------------------------
, ( "-version" , NoArg (do hPutStrLn stderr (_ProjectName
++ ", version " ++ _ProjectVersion
++ ", patchlevel " ++ _ProjectPatchLevel)
exitWith ExitSuccess))
, ( "-version" , NoArg (do hPutStrLn stderr (_ProjectName
++ ", version " ++ version_str)
exitWith ExitSuccess))
, ( "-numeric-version", NoArg (do hPutStrLn stderr version_str
exitWith ExitSuccess))
------- verbosity ----------------------------------------------------
, ( "v" , NoArg (writeIORef verbose True) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment