#!/usr/bin/env bash
+# Desc: Recursively timestamp files with OpenTimestamp
+# Usage: bkots [PATH]
+# Version: 0.2.0
# Define variables
declare -g max_job_count="2"; # default max job count
declare -g age_threshold="60"; # min age to add file; seconds;
+declare -g stamp_throttle="0.1"; # seconds delay between stamps
+declare -g stamp_throttle_fail="1"; # seconds delay if stamp errors
declare -Ag appRollCall # Associative array for storing app status
declare -Ag fileRollCall # Associative array for storing file status
declare -Ag dirRollCall # Associative array for storing dir status
if [[ "$opVerbose" = "true" ]]; then declare -p cmd_temp; fi;
#### execute command
- "${cmd_temp[@]}";
+ if "${cmd_temp[@]}"; then
+ sleep "$stamp_throttle" || die "FATAL:Invalid stamp throttle.";
+ else
+ yell "ERROR:Could not stamp file with command:$(declare -p cmd_temp)";
+ sleep "$stamp_throttle_fail" || die "FATAL:Invalid stamp throttle.";
+ fi;
+
unset cmd_temp;
#ots stamp "$path_src";
else