#!/bin/bash if ! output=$(../../../file-timestamps --generate a) then echo "$0: file-timestamps failed" 1>&2 echo "$output" 1>&2 exit 1 fi case "$output" in equal) # Good; there was no preexisting timestamps file, so this should be equal exit 0 ;; unequal) echo "Bad: there was no preexisting timestamps file, so this should have been equal" 1>&2 exit 1 ;; *) echo "Bad: strange output found:" 1>&2 echo "$output" 1>&2 exit 1 ;; esac