summaryrefslogtreecommitdiffstats
path: root/.local/bin/ghauth
blob: 15f39a1c4dcf7173500854a1e6696f667334063c (plain)
1
2
3
4
5
6
7
8
#/bin/bash

[[ "x${TERMUX_VERSION}" == "x" ]] && PIPE_CMD='xclip -selection clipboard' || PIPE_CMD='cat -'

gpg --pinentry-mode loopback --decrypt --quiet "${HOME}/.2fa/justanothercatgirl@github.com/.key" | oathtool --totp -b - | ${PIPE_CMD}