this really ought to do:

    PATH=$PATH:. $SCRIPT -r $PKGSRVR $batch_flag || logerr "Unable to run $SCRIPT"

Or similar.