Mach/builder/src-c/main.c

28 lines
492 B
C

#include <mach.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char *mach_config_path = NULL;
if(argc == 1)
{
mach_config_path = "./MachScript.mach";
}
if(argc == 2)
{
mach_config_path = argv[1];
}
if(mach_config_path == NULL)
{
printf("Usage: %s <config-path (empty for Mach.cfg)>", argv[1]);
return -1;
}
MachScript script;
mach_read_script(mach_config_path, &script);
return 0;
}