#!/bin/sh # inroot: Set lots of environment variables which act as a sort of opt-in # "chroot". See also "jhbuild". # Copyright 2010 Colin Walters # Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php) set -e root=$1 shift if test -d /lib64; then libext=64 else libext= fi if test -d "${root}/share/aclocal"; then ACLOCAL_FLAGS="-I ${root}/share/aclocal" export ACLOCAL_FLAGS fi exec env \ INROOT_DIR=${root} \ XDG_DATA_DIRS=${root}/share:/usr/share \ LD_LIBRARY_PATH=${root}/lib${libext} \ PATH=${root}/bin:${PATH} \ PKG_CONFIG_PATH=${root}/lib${libext}/pkgconfig:${root}/share/pkgconfig \ PYTHONPATH=${root}/lib${libext}/python2.5/site-packages \ "$@"