source: code/trunk/kanakototp@ 10

Last change on this file since 10 was 9, checked in by koizumi.aoi, 3 years ago

Add kanakomenu and kanakototp addons, etc.

Signed-off-by: Aoi K <koizumi.aoi@…>

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