chore(user/get_gpgkey_from_gitlog.sh):Add version number
[BK-2020-03.git] / user / check_ots.sh
1 #!/bin/bash
2
3 yell() { echo "$0: $*" >&2; } # print script path and all args to stderr
4 die() { yell "$*"; exit 111; } # same as yell() but non-zero exit status
5 try() { "$@" || die "cannot $*"; } # runs args as command, reports args if command fails
6
7 if [[ ! -f $1 ]]; then die "FATAL:Not a file:$1"; fi;
8
9 ots u "$1" 1>/dev/null 2>&1;
10
11 if ! ( ots v "$1" 1>/dev/null 2>/dev/null ); then
12 yell "ERROR:Verification failed:$1";
13 ots v "$1";
14 fi;