diff options
author | Matthew Booth <mbooth@redhat.com> | 2011-11-23 16:35:10 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-11-24 11:53:36 +0000 |
commit | 252ad4aa41c213948e4ee1f01e6c7ff7861f75e3 (patch) | |
tree | a464d619cc4adad74a8b78310685bdb630df3be9 | |
parent | 065b6b5798913c9bb40215944920199ae7d27007 (diff) | |
download | libguestfs-252ad4aa41c213948e4ee1f01e6c7ff7861f75e3.tar.gz libguestfs-252ad4aa41c213948e4ee1f01e6c7ff7861f75e3.tar.xz libguestfs-252ad4aa41c213948e4ee1f01e6c7ff7861f75e3.zip |
run script: Don't overwrite LD_LIBRARY_PATH and PERL5LIB
This change allows the run scripts of virt-v2v and libguestfs to be chained.
-rwxr-xr-x | run.in | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -37,9 +37,19 @@ b=@abs_builddir@ 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" +if [ -z "$LD_LIBRARY_PATH" ]; then + LD_LIBRARY_PATH="$b/src/.libs" +else + LD_LIBRARY_PATH="$b/src/.libs:$LD_LIBRARY_PATH" +fi +if [ -z "$PERL5LIB" ]; then + PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" +else + PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB" +fi +LIBGUESTFS_PATH="$b/appliance" + +export LD_LIBRARY_PATH PERL5LIB LIBGUESTFS_PATH # Do we have libtool? If we have it then we can use it to make # running valgrind simpler. However don't depend on it. |