Allow multiple -u flags
This commit is contained in:
parent
c7f4a01401
commit
224fba34bb
1 changed files with 6 additions and 7 deletions
13
c4mate
13
c4mate
|
@ -136,8 +136,7 @@ sed -n '
|
|||
T fail
|
||||
b
|
||||
:fail
|
||||
q 1
|
||||
']=], self.CURL_FLAGS, self.HOST, url_encode(self.USER), datefile))
|
||||
q 1 ']=], self.CURL_FLAGS, self.HOST, url_encode(self.USER), datefile))
|
||||
|
||||
while true do
|
||||
local entry = {}
|
||||
|
@ -242,8 +241,7 @@ sed -n --sandbox '
|
|||
T fail
|
||||
b
|
||||
:fail
|
||||
q 1
|
||||
']=], self.CURL_FLAGS, self.HOST))
|
||||
q 1 ']=], self.CURL_FLAGS, self.HOST))
|
||||
|
||||
while true do
|
||||
local item = {}
|
||||
|
@ -311,10 +309,11 @@ Add or subtract credits:
|
|||
c4mate <difference>
|
||||
Give credits:
|
||||
c4mate -g <amount> <user> [<reason>]]=])
|
||||
return
|
||||
os.exit(0)
|
||||
end
|
||||
|
||||
-- Parse -u flag.
|
||||
elseif arg[1] == "-u" then
|
||||
-- Parse -u flag (which may be given multiple times).
|
||||
while arg[1] == "-u" do
|
||||
table.remove(arg, 1)
|
||||
USER = arg[1]
|
||||
table.remove(arg, 1)
|
||||
|
|
Loading…
Reference in a new issue