# $Id$

test_vcdxbuild_cleanup() {
    rm -f core videocd.bin videocd.cue $*
}

test_vcdxbuild() {
    VCDXBUILD="../frontends/xml/vcdxbuild"

    RC=0

    if [ ! -x "${VCDXBUILD}" ]; then
	echo "$0: ${VCDXBUILD} missing, check not possible"
	RC=77
	return $RC
    fi

    if have_cksum; then
	:
    else
	echo "$0: md5sum not found, check not possible";
	RC=77
	return $RC
    fi

    cmd="${VCDXBUILD} $2 --create-time TESTING --check --file-prefix `dirname $1`/ $1"
    if $cmd; then
	:
    else
	echo "$0 failed running:"
	echo "$cmd"
	RC=1
	return $RC
    fi

    return $RC
}

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***
