source: code/trunk/addons/kanako_totp@ 18

Last change on this file since 18 was 17, checked in by yakumo.izuru, 2 years ago

Small revision

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

  • Property svn:executable set to on
File size: 378 bytes
Line 
1#!/bin/sh -e
2# $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
3# extracted from https://rgz.ee/bin/pass
4
5totp_seed="$(kanako -v "$@" | grep 'totp: ' | head -n1 | cut -d' ' -f2)"
6if ! [ -z "$totp_seed" ]; then
7 if command -v oathtool >/dev/null 2>&1; then
8 oathtool --totp -b "$totp_seed"
9 else
10 echo 'oathtool(1) should be installed'
11 exit 1
12 fi
13fi
Note: See TracBrowser for help on using the repository browser.