summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/upbc.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/upbc.lua b/tools/upbc.lua
index bf9a68d..9d9531c 100644
--- a/tools/upbc.lua
+++ b/tools/upbc.lua
@@ -15,8 +15,13 @@ local upb = require "upb"
local generate_upbdefs = false
for _, argument in ipairs(arg) do
- if argument == "--generate-upbdefs" then
- generate_upbdefs = true
+ if argument.sub(argument, 1, 2) == "--" then
+ if argument == "--generate-upbdefs" then
+ generate_upbdefs = true
+ else
+ print("Unknown flag: " .. argument)
+ return 1
+ end
else
src = argument
end
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback