Commit e1c2ce36 authored by Jurrien Stutterheim's avatar Jurrien Stutterheim
Browse files

Rename envsdir to envsfile; more accurate

parent 18b9c60d
......@@ -50,21 +50,21 @@ Start world
showUsage :: !*World -> *World
showUsage world = show
[ "BatchBuild"
, "Usage: BatchBuild [--force] filename [--action=ARG] [--envsdir=ARG]"
, " --action : Execute a specific action. Possible actions:"
, " build : Build a project (default)."
, " create : Create a basic project file for a module."
, " show : Summarize the contents of a project file."
, " --envsdir : Specify a directory where environment files can be found (defaults to 'IDEEnvs')"
, "Usage: BatchBuild [--force] filename [--action=ARG] [--envsfile=ARG]"
, " --action : Execute a specific action. Possible actions:"
, " build : Build a project (default)."
, " create : Create a basic project file for a module."
, " show : Summarize the contents of a project file."
, " --envsfile : Specify an environments file (defaults to 'IDEEnvs')"
] world
buildProject :: *World BBArgs -> *World
buildProject world {force_rebuild=force_rebuild, filename=filename, args=args}
# (startup,world) = accFiles GetFullApplicationPath world
# envsdir = case getStringArg "envsdir" args of
# envsfile = case getStringArg "envsfile" args of
(Just p) -> application_path p
_ -> application_path EnvsFileName
# (envs,world) = openEnvironments startup envsdir world
# (envs,world) = openEnvironments startup envsfile world
# ((proj,ok,err),world) = accFiles (ReadProjectFile (fromJust filename) startup) world
| not ok || err <> "" = wAbort ("BatchBuild failed while opening project: "+++.err+++."\n") world
# (ok,logfile,world) = openLogfile (fromJust filename) world
......@@ -159,7 +159,7 @@ pFilename :: CParser Char (Maybe String) BBArgs
pFilename = (pNotSpace <@ Just o toString) <!> yield Nothing
pArgs :: CParser Char BBArg BBArgs
pArgs = pStringLongOpt "envsdir" <|> pBoolLongOpt "force" <|> pStringLongOpt "action"
pArgs = pStringLongOpt "envsfile" <|> pBoolLongOpt "force" <|> pStringLongOpt "action"
......
Supports Markdown
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