]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/usb_cmd_h2lua.awk
Update/cleanup Makefiles (#265)
[proxmark3-svn] / client / usb_cmd_h2lua.awk
diff --git a/client/usb_cmd_h2lua.awk b/client/usb_cmd_h2lua.awk
new file mode 100644 (file)
index 0000000..8e00356
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN {
+       print "--[["
+       print "These are Proxmark command definitions."
+       print "This file is automatically generated from usb_cmd.h - DON'T EDIT MANUALLY."
+       print "--]]"
+       print "local __commands = {"
+}
+
+#$1 ~ /#define/ && $2 ~ /^CMD_([[:alnum:]_])+/ { print $2, "=", $3, "," }
+$1 ~ /#define/ && $2 ~ /^CMD_[A-Za-z0-9_]+/ { sub(/\r/, ""); print $2, "=", $3 "," }
+
+END {
+       print "}"
+       print "return __commands"
+}
Impressum, Datenschutz