#!/bin/sh

# change these to fit your religion ...

BINPATH=/usr/local/bin/

##### No need to touch the rest #####

QPCOMP=${BINPATH}/qdebugger

if [ x$1 = x ]; then
	echo usage: qdb {file name}
	exit 1
fi

if [ ! -f $1 ]; then
	echo qdb: no such file: $1
	exit 1
fi

name=`basename $1 .pas`

# echo compiling
${QPCOMP} ${name}.pas 
if [ $? != 0 ]; then
	rm ${name}.as
	echo error in debugging. stop.
	exit 2
fi
