Skip to content

Instantly share code, notes, and snippets.

View zmstone's full-sized avatar

zmstone zmstone

View GitHub Profile
#!/usr/bin/env escript
%% -*- erlang -*-
main(["usage"]) ->
io:format("./schema_fix.escript [--dry-run] schema.DAT [add | replace] 'emqx3@127.0.0.1' ~n",
[]);
main(["--dry-run", SchemaFile, Op, NodeStr]) ->
run(true, SchemaFile, Op, NodeStr);
main([SchemaFile, Op, NodeStr]) ->
run(false, SchemaFile, Op, NodeStr);
main(_) ->