echo `date`" $computer: Running $TARCMD" >&2
eval $TARCMD > $DATE.idx
- if [ -s $TARFILE ]; then
- # File is >0 in size, we assume it worked.
+ if [ $? -eq 0 ] && [ -s $TARFILE ]; then
+ # File is >0 in size and neither cat or tar tzvf failed; we assume it worked.
# Move tar file in place
mv $TARFILE $DATE.tgz