Commit 412009d5 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Don't separate build commands with an empty line.\n\nThis allows to fit more commands on screen.

parent 50dbdd40
......@@ -174,7 +174,7 @@ putError msg = do
-- | Render the given set of lines in a nice box of ASCII
renderBox :: [String] -> String
renderBox ls = concatMap ('\n' :) (boxTop : map renderLine ls ++ [boxBot])
renderBox ls = tail $ concatMap ('\n' :) (boxTop : map renderLine ls ++ [boxBot])
where
-- Minimum total width of the box in characters
minimumBoxWidth = 32
......
......@@ -71,7 +71,7 @@ copyFile source target = do
createDirectory :: FilePath -> Action ()
createDirectory dir = do
putBuild $ "\n| Create directory " ++ dir
putBuild $ "| Create directory " ++ dir
liftIO $ IO.createDirectoryIfMissing True dir
-- Note, the source directory is untracked
......@@ -85,7 +85,7 @@ moveDirectory source target = do
-- Transform a given file by applying a function to its contents
fixFile :: FilePath -> (String -> String) -> Action ()
fixFile file f = do
putBuild $ "\n| Fix " ++ file
putBuild $ "| Fix " ++ file
old <- liftIO $ readFile file
let new = f old
length new `seq` liftIO $ writeFile file new
......@@ -93,14 +93,14 @@ fixFile file f = do
runConfigure :: FilePath -> [CmdOption] -> [String] -> Action ()
runConfigure dir opts args = do
need [dir -/- "configure"]
putBuild $ "\n| Run configure in " ++ dir ++ "..."
putBuild $ "| Run configure in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts args
runMake :: FilePath -> [String] -> Action ()
runMake dir args = do
need [dir -/- "Makefile"]
let note = if null args then "" else " (" ++ intercalate "," args ++ ")"
putBuild $ "\n| Run make" ++ note ++ " in " ++ dir ++ "..."
putBuild $ "| Run make" ++ note ++ " in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) "make" ["-C", dir, "MAKEFLAGS="] args
runBuilder :: Builder -> [String] -> Action ()
......@@ -108,7 +108,7 @@ runBuilder builder args = do
needBuilder laxDependencies builder
path <- builderPath builder
let note = if null args then "" else " (" ++ intercalate "," args ++ ")"
putBuild $ "\n| Run " ++ show builder ++ note
putBuild $ "| Run " ++ show builder ++ note
quietly $ cmd [path] args
-- Print out key information about the command being executed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment