2 # libguestfs 'run' programs locally script
3 # Copyright (C) 2011 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #----------------------------------------------------------------------
21 # With this script you can run all the virt tools without needing to
22 # install them first. You just have to do for example:
24 # ./run ./inspector/virt-inspector [args ...]
26 # This works for any C, OCaml or Perl virt tools in the libguestfs
27 # distribution. Also you can make a symbolic link to this 'run'
28 # script from anywhere (eg. $HOME/bin/run) if you wish.
30 #----------------------------------------------------------------------
33 run=$(readlink -f "$0")
36 # Set local environment relative to this script.
37 export LD_LIBRARY_PATH="$b/src/.libs"
38 export LIBGUESTFS_PATH="$b/appliance"
39 export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
42 libtool --mode=execute "$@"