#!/bin/bash -e

# gfortran 4.7 from devtools-1.1 (on CentOS5) produces binaries that
# print STOP to stderr when not needed.
# https://www.centos.org/forums/viewtopic.php?p=105080#p105080
# It must be avoided because ccp4i assumes failure when a program prints
# to stderr.

num_lines=$(dyndom one two 2>&1 | wc -l)
if [ $num_lines != 1 ]; then
    echo "Unexpected output from dyndom: $num_lines lines instead of 1"
    exit 1
fi
