mad_cubical.erl 447 B

1234567891011
  1. -module(mad_cubical).
  2. -copyright('Maxim Sokhatsky').
  3. -compile(export_all).
  4. compile(File,_Inc,_Bin,_Opt,_Deps) ->
  5. {_,Res,Msg} = sh:run(sh:executable("cubical"), ["-b", File], binary, "."),
  6. case Res of
  7. 1 -> true;
  8. 0 -> case binary:match(Msg,[<<"File loaded.">>]) of
  9. nomatch -> io:format("Error: ~p~n",[Msg]), true;
  10. _ -> io:format("OK: ~p.~n",[filename:basename(File)]), false end end.