From a830563ebd4445ee3e8c9c46d6eafcfeff5943c2 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 25 May 2020 15:19:01 +0000 Subject: [PATCH] credentials: remove -r It's pointless now with sekrit cp. --- bin/credentials.sh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/bin/credentials.sh b/bin/credentials.sh index 7126c3d..9037e32 100644 --- a/bin/credentials.sh +++ b/bin/credentials.sh @@ -15,7 +15,6 @@ usage() cat - <<. >&2 Usage: ${0##*/} [-2pu] service - ${0##*/} -r key . exit 1 } @@ -90,28 +89,15 @@ get_service() [ $sfa = yes ] && get_2fa "$service" } -get_raw() -{ - key=$1 - - sekrit has "$key" || err "unknown key $key" - - printf "%s" "$key" - sekrit get "$key" | clip && printf "\n" -} - sfa=no pass=no -raw=no user=no -while getopts 2pru flag; do +while getopts 2pu flag; do case $flag in 2) sfa=check ;; p) pass=check ;; - r) raw=yes - ;; u) user=check ;; *) usage @@ -123,11 +109,4 @@ shift $((OPTIND - 1)) [ $# -eq 1 ] && [ -n "$1" ] || usage key=$1 -if [ $raw = yes ]; then - if [ $sfa != no ] || [ $pass != no ] || [ $user != no ]; then - err "-r is mutually exclusive with -2pu" - fi - get_raw "$key" -else - get_service "$key" $user $pass $sfa -fi +get_service "$key" $user $pass $sfa