proxmark3/client/pm3_cmd_h2lua.awk

16 lines
429 B
Awk
Raw Normal View History

2017-07-28 02:48:49 +08:00
BEGIN {
2019-03-10 06:35:06 +08:00
print "--[["
print "These are Proxmark command definitions."
print "This file is automatically generated from pm3_cmd.h - DON'T EDIT MANUALLY."
2019-03-10 06:35:06 +08:00
print "--]]"
print "local __commands = {"
2017-07-28 02:48:49 +08:00
}
#$1 ~ /#define/ && $2 ~ /^CMD_([[:alnum:]_])+/ { print $2, "=", $3, "," }
$1 ~ /#define/ && $2 ~ /^CMD_[A-Za-z0-9_]+/ { sub(/\r/, ""); print $2, "=", $3 "," }
END {
2019-03-10 06:35:06 +08:00
print "}"
print "return __commands"
2017-07-28 02:48:49 +08:00
}