#!/bin/bash
#
# This is a script which runs tools set up for the Steam runtime

PROGRAM=$(basename "$0")

if [ -z "${STEAM_RUNTIME_ROOT}" ]; then
    echo "Missing development environment variables, did you run shell.sh?"
    exit 1
fi

# Run the tool...
result=$("${STEAM_RUNTIME_ROOT}/usr/bin/${PROGRAM}" "$@")
status=$?
if [ "$result" != "" ]; then
    echo "$result" | sed -e "s,-I/,-I${STEAM_RUNTIME_ROOT}/,g" -e "s,-L/,-L${STEAM_RUNTIME_ROOT}/,g" 
fi
exit $status

# vi: ts=4 sw=4 expandtab
