#!/bin/sh if [[ "$OSTYPE" == "darwin"* ]]; then SED=gsed else SED=sed fi kaitai-struct-compiler -t graphviz solec.ksy dot -Tsvg solec.dot > solec.svg rm solec.dot ~/bin/kaitai-struct-compiler-ws/bin/kaitai-struct-compiler -t wireshark --read-pos solec.ksy ${SED} -i -e '5s/.*/package.path = "kaitai_struct_lua_runtime\/?.lua" .. package.path/' solec.lua ${SED} -i -e 's/, self.type_payload//' solec.lua cat <> solec.lua local tcp_port = DissectorTable.get("tcp.port") tcp_port:add(9999, proto) EOT