From 6ff06cc7f17e0ea1af88e6d295c9bfa35933adfd Mon Sep 17 00:00:00 2001 From: Bartłomiej Piotrowski Date: Sun, 4 Jun 2017 23:30:09 +0200 Subject: Make sure $otp_algorithm is lowercase (#33) Otherwise oathtool is unhappy. --- otp.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp.bash b/otp.bash index c46954e..95f171a 100755 --- a/otp.bash +++ b/otp.bash @@ -243,7 +243,7 @@ cmd_otp_code() { case "$otp_type" in totp) cmd="$OATH -b --totp" - [[ -n "$otp_algorithm" ]] && cmd+="=$otp_algorithm" + [[ -n "$otp_algorithm" ]] && cmd+="=${otp_algorithm,,}" [[ -n "$otp_period" ]] && cmd+=" --time-step-size=$otp_period"s [[ -n "$otp_digits" ]] && cmd+=" --digits=$otp_digits" cmd+=" $otp_secret" -- cgit v1.2.3