From: Daniel Kolesa Date: Wed, 7 May 2014 09:41:19 +0000 (+0100) Subject: elua: more checks X-Git-Tag: upstream/1.10.0+1149+ga3a15b1~644^2~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38ae60f74480ceb834a135531972a16ec4c32e94;p=platform%2Fupstream%2Fefl.git elua: more checks --- diff --git a/src/bin/elua/xgettext.lua b/src/bin/elua/xgettext.lua index 922378d..56f36af 100644 --- a/src/bin/elua/xgettext.lua +++ b/src/bin/elua/xgettext.lua @@ -159,7 +159,7 @@ local opts, args = getopt.parse { } } -if not opts or opts["h"] or opts["v"] then +if not opts or opts["h"] or opts["v"] or #args == 0 then return true end @@ -199,12 +199,15 @@ if hasxgettext and not onlylua then for i, opt in ipairs(opts) do gargs[#gargs + 1] = build_opt(opt) end + local ngargs = #gargs for i, v in ipairs(args) do if not v:match("^.+%.lua$") then gargs[#gargs + 1] = v end end - cutil.exec(unpack(gargs)) + if #gargs ~= ngargs then + cutil.exec(unpack(gargs)) + end end return true \ No newline at end of file