summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorDaniel Neri <daniel.neri@sigicom.se>2008-01-29 15:40:37 +0100
committerDaniel Neri <daniel.neri@sigicom.se>2008-01-29 15:40:37 +0100
commit41866b74268d1a7e23e7b071e41bdc1da0d656a0 (patch)
tree4d35f390afba193357abb81da7a07c2ce63dc8a0 /Main.hs
parenteffc9bab697c237c872d141f72b794364d4b234f (diff)
downloadmetatile-41866b74268d1a7e23e7b071e41bdc1da0d656a0.tar
metatile-41866b74268d1a7e23e7b071e41bdc1da0d656a0.zip
Get version from the Paths_xmonad module generated by Cabal
No need to bump version in more than one place. darcs-hash:20080129144037-6cd96-43776bf811da0f4ab36901be3dfb7981b1261730
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 772577c..0dd6b52 100644
--- a/Main.hs
+++ b/Main.hs
@@ -21,6 +21,9 @@ import System.Info
import System.Environment
import System.Posix.Process (executeFile)
+import Paths_xmonad (version)
+import Data.Version (showVersion)
+
#ifdef TESTING
import qualified Properties
#endif
@@ -36,7 +39,7 @@ main = do
["--resume", _] -> launch
["--recompile"] -> recompile False >> return ()
["--recompile-force"] -> recompile True >> return ()
- ["--version"] -> putStrLn "xmonad 0.6"
+ ["--version"] -> putStrLn ("xmonad " ++ showVersion version)
#ifdef TESTING
("--run-tests":_) -> Properties.main
#endif