Sha256: ebaabc16adacbbb1741b68982b2858ee22d472229e9ebb16ce51c371708d4d78

Contents?: true

Size: 352 Bytes

Versions: 2

Compression:

Stored size: 352 Bytes

Contents

#!/usr/bin/env ruby

require_relative "../lib/pws/otp"

require "rationalist"

argv = Rationalist.parse

case argv[:_][0]
when "time"
  action = :get_totp
else
  raise ArgumentError, "no valid OTP action given"
end

arguments = argv[:_][1..-1]
# TODO Support same options as PWS
status = PWS.new({}).public_send(action, *arguments)
exit(status ? 0 : 2)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pws-otp-0.9.1 bin/pws-otp
pws-otp-0.9.0 bin/pws-otp