aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Aurèle Brothier <m@brothier.org>2018-01-21 22:24:20 +0100
committerTad Fisher <tadfisher@gmail.com>2018-01-21 13:24:20 -0800
commit7e54497f8889427cfaad5893b265309a7b60dfc7 (patch)
treeb28b38a0e82dd15210cb650213a349df0aaa9198
parentb8009511b32a5d502148ad8a8397c9cfd7c75a40 (diff)
downloadpass-otp-7e54497f8889427cfaad5893b265309a7b60dfc7.tar.gz
pass-otp-7e54497f8889427cfaad5893b265309a7b60dfc7.zip
Use a compatible to lowercase syntax for bash < 4 (#41)
-rwxr-xr-xotp.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/otp.bash b/otp.bash
index 6a28fbd..16d0ef4 100755
--- a/otp.bash
+++ b/otp.bash
@@ -317,7 +317,7 @@ cmd_otp_code() {
case "$otp_type" in
totp)
cmd="$OATH -b --totp"
- [[ -n "$otp_algorithm" ]] && cmd+="=${otp_algorithm,,}"
+ [[ -n "$otp_algorithm" ]] && cmd+=$(echo "=${otp_algorithm}"|tr "[:upper:]" "[:lower:]")
[[ -n "$otp_period" ]] && cmd+=" --time-step-size=$otp_period"s
[[ -n "$otp_digits" ]] && cmd+=" --digits=$otp_digits"
cmd+=" $otp_secret"