summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3904c72)
new file: user/check_ots.sh
--- /dev/null
+#!/bin/bash
+
+yell() { echo "$0: $*" >&2; } # print script path and all args to stderr
+die() { yell "$*"; exit 111; } # same as yell() but non-zero exit status
+try() { "$@" || die "cannot $*"; } # runs args as command, reports args if command fails
+
+if [[ ! -f $1 ]]; then die "FATAL:Not a file:$1"; fi;
+
+ots u "$1" 1>/dev/null 2>&1;
+
+if ! ( ots v "$1" 1>/dev/null 2>/dev/null ); then
+ yell "ERROR:Verification failed:$1";
+ ots v "$1";
+fi;