blob: 8688999c58a41ed7cfef3505c9137454f868408d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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
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 \
"$@"
|