if [[ -e $f ]]; then
now=$(date +%s)
fsec=$(stat -c%Y $f)
+ # the / 60 makes it 0-59 seconds less strict, +1 makes sure we
+ # dont have any false positives.
fmin=$(( (fsec - now ) / 60 + 1 ))
fminplus=$(( fmin + 60*24 ))
# Filesystem files get copied, so find any newer than the last run.
if grep -qxF $HOSTNAME $x; then all_dirs+=( ${x%.hosts} ); fi
done
+ # just because i forget a lot, -mmin -NUM means files modified <= NUM minutes ago
if (( $(date -d "$(git log --diff-filter=ACR --format=%aD -1)" +%s) > fsec )) || \
[[ $(find ${all_dirs[@]} -mmin $fmin -type f -print -quit 2>/dev/null) ]]; then
v conflink newer git or newer filesystem files