kibro-0.0: executable/Build.hs
module Build where
import Directory
import Control.Applicative
import Data.List
import System.Process
import System.FilePath
import System.Exit
import Utils
build :: [String] -> IO ()
build _ = inKibro $ \dir name -> do
doing $ "Building " ++ name
doBuild dir name
return ()
doBuild :: String -> String -> IO ExitCode
doBuild dir name = do doing cmd; runCommand cmd >>= waitForProcess
where cmd = "ghc --make src" ./. "Main.hs -o public" ./. fcgi ++ " -threaded"
fcgi = name ++ ".fcgi"