Commit 24509440 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

ifBuildable now prints a warning if the package is not buildable

parent e43dbbde
......@@ -6,6 +6,7 @@ import System.Cmd
import System.Directory
import System.Environment
import System.Exit
import System.IO
main :: IO ()
main = do args <- getArgs
......@@ -15,12 +16,17 @@ main = do args <- getArgs
[_] ->
error "No command given"
package : prog : progArgs ->
do setCurrentDirectory package
doit package prog progArgs
doit :: String -> String -> [String] -> IO ()
doit package prog progArgs
= do setCurrentDirectory package
unbuildable <- doesFileExist "unbuildable"
if unbuildable
then do mustBeBuildables <- getMustBeBuildablePackages
when (package `elem` mustBeBuildables)
(error (package ++ " is unbuildable"))
if package `elem` mustBeBuildables
then error (package ++ " is unbuildable")
else hPutStrLn stderr "Warning: Package is unbuildable"
else do ec <- rawSystem prog progArgs
exitWith ec
......
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