#!/bin/sh

# This is python code that figures out the new version of the 
# library path.
base="`dirname \"$0\"`"
base="`cd \"$base\"; pwd`"

for i in "$base/"*-*; do
    if [ "x$LD_LIBRARY_PATH" = "x" ]; then
        export LD_LIBRARY_PATH="$i/lib"
    else
        export LD_LIBRARY_PATH="$i/lib:$LD_LIBRARY_PATH"
    fi

    if "$i/python.real" -c "import sys; sys.exit(0)"; then
        exec $PY4RENPY_GDB "$i/python.real" "$@"
    fi
done

echo "Could not find a python that runs on your platform. Sorry."
