aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xotp.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/otp.bash b/otp.bash
index 447af1e..33aca78 100755
--- a/otp.bash
+++ b/otp.bash
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# []
+VERSION="1.1.0"
OATH=$(which oathtool)
## source: https://gist.github.com/cdown/1163649
@@ -185,6 +186,11 @@ _EOF
exit 0
}
+cmd_otp_version() {
+ echo $VERSION
+ exit 0
+}
+
cmd_otp_insert() {
local opts force=0 echo=0 from_secret=0
opts="$($GETOPT -o fesi:a: -l force,echo,secret,issuer:,account: -n "$PROGRAM" -- "$@")"
@@ -398,6 +404,7 @@ cmd_otp_validate() {
case "$1" in
help|--help|-h) shift; cmd_otp_usage "$@" ;;
+ version|--version) shift; cmd_otp_version "$@" ;;
insert|add) shift; cmd_otp_insert "$@" ;;
append) shift; cmd_otp_append "$@" ;;
uri) shift; cmd_otp_uri "$@" ;;