hex_to_raw actually works

This commit is contained in:
Scott Chacon
2010-05-25 07:37:45 -07:00
parent d76f1e87f2
commit abdd070a77
6 changed files with 41 additions and 54 deletions

21
geef Executable file
View File

@@ -0,0 +1,21 @@
#!/Users/schacon/projects/otp/bin/escript
%% -*- erlang -*-
%%! debug verbose -noshell
main([Command|_Args]) ->
geef:start(),
case Command of
"h2r" ->
[Object|_Rest] = _Args,
Raw = geef:hex_to_raw(Object),
io:format("Raw ~w~n", [Raw]);
_Else ->
usage()
end;
main(_) ->
usage().
usage() ->
io:format("usage: ./geef h2r HEX_SHA\n"),
halt(1).