X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=run;h=2945315d8e2f1e8bd659957b0aaeba5d6ddc9949;hb=88f9599e1f55a440d34c93dae2e39d5574ffca7a;hp=04152b1b524416d38833a447780e82617e70606e;hpb=d642bef76613be44be733bbfcdb560d86c8ef8b5;p=libguestfs.git diff --git a/run b/run index 04152b1..2945315 100755 --- a/run +++ b/run @@ -33,10 +33,20 @@ run=$(readlink -f "$0") b=$(dirname "$run") +# Set TMPDIR so the appliance doesn't conflict with globally +# installed libguestfs. +export TMPDIR=$b + # Set local environment relative to this script. export LD_LIBRARY_PATH="$b/src/.libs" export LIBGUESTFS_PATH="$b/appliance" export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" +# Do we have libtool? If we have it then we can use it to make +# running valgrind simpler. However don't depend on it. +if libtool --help >/dev/null 2>&1; then + libtool="libtool --mode=execute" +fi + # Run the program. -libtool --mode=execute "$@" +exec $libtool "$@"