X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=run;h=2945315d8e2f1e8bd659957b0aaeba5d6ddc9949;hp=04152b1b524416d38833a447780e82617e70606e;hb=0938e43a60f9d729d9795cf45498e60217fece0e;hpb=5790f5bfafb12cc2ed9365461bf66e0fdfde7150 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 "$@"