#!/usr/bin/env python

import sys, os

# this 'qrt' script is in bin/qrt, below the source directory, so we want to
# add the parent directory to sys.path.
me = os.path.abspath(sys.argv[0])
sourcedir = os.path.dirname(os.path.dirname(me))
sys.path.insert(0, sourcedir)

# thus this should always work:
from qruntime.scripts.runner import run

# Delegate everything else off to the runner, which must be careful to not
# import too much unless the command specifically asks for it.

rc = run(sys.argv[1:], sys.stdout, sys.stderr)
sys.exit(rc)
