+must() { "$@" || die "cannot $*"; } # runs args as command, reports args if command fails
+check_givens() {
+ if [[ ! -f $1 ]]; then die "FATAL:Not a file:$1"; fi;
+ re=".ots$|.OTS$";
+ if [[ ! "$1" =~ $re ]]; then die "FATAL:Not an OTS file extension:$1"; fi;
+ if [[ $# -ne 1 ]]; then die "FATAL:Incorrect argument count:$#"; fi;
+ if ! command -v ots 1>/dev/random 2>&1; then die "FATAL:Not found:ots"; fi;
+}; # Check given assumptions
+upgrade_ots() {
+ # Depends: GNU Coreutils 8.32 (date), ots 0.7.0
+
+ file_in="$1";
+ file_bak="$file_in".bak ;