summaryrefslogtreecommitdiffstats
path: root/bin/inroot
blob: f513f95bab3ce85e94c8ba932a0b742c0534792f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# inroot: Set lots of environment variables which act as a sort of opt-in
# "chroot".  See also "jhbuild".
# Copyright 2010 Colin Walters <walters@verbum.org>
# 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
exec env INROOT_DIR=${root} ACLOCAL_FLAGS="-I ${root}/share/aclocal $ACLOCAL_FLAGS" XDG_DATA_DIRS=${root}/share LD_LIBRARY_PATH=${root}/lib${libext} PATH=${root}/bin:${PATH} PKG_CONFIG_PATH=${root}/lib${libext}/pkgconfig PYTHONPATH=${root}/lib${libext}/python2.5/site-packages "$@"