Newer
Older
then
echo "Wrong number of arguments." >&2
exit 1
fi
cmd="${1}"
input="${2}"
# docbook2man inserts a date formatted using the current locale into its
# output. Using the "C" locale makes sure it's always in the default format.
export LC_ALL=C
tmpdir=`mktemp -d`
trap "rm -rf ${tmpdir}" EXIT
if ! ( cd `dirname ${input}` &&
${cmd} -o ${tmpdir} `basename "${input}"` >/dev/null; )
then
echo "Building ${output} failed." >&2
exit 1
mv "${tmpdir}/${cmdoutputfile}" "${output}"
# Needed for make to recognize output file
touch "${output}"