X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=cat%2Frun-cat-locally;h=7945463cd388c042da65feaf26fb18b7e3232519;hp=be60d076a9b1604ef5e6b90dcc49b1be57a39816;hb=2729421d176e1194537b499911a5eeb5e32a8b09;hpb=75b6338da3e6e33c02b931623f074ab5a76a1788 diff --git a/cat/run-cat-locally b/cat/run-cat-locally index be60d07..7945463 100755 --- a/cat/run-cat-locally +++ b/cat/run-cat-locally @@ -1,5 +1,4 @@ #!/usr/bin/perl -# virt-cat # Copyright (C) 2009 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify @@ -16,9 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# This script sets up the environment so you can run virt-cat in place -# without needing to do 'make install' first. You can also run virt-cat -# by creating a symlink to this script and putting it in your path. +# This script sets up the environment so you can run virt-* tools in +# place without needing to do 'make install' first. You can also run +# the tools by creating a symlink to this script and putting it in +# your path. # # Use it like this: # ./run-cat-locally [usual virt-cat args ...] @@ -31,6 +31,7 @@ use File::Spec; use Cwd qw(abs_path); my $path = $0; +my $tool = "cat"; # Follow symlinks until we get to the real file while(-l $path) { @@ -47,6 +48,6 @@ $path = abs_path(dirname($path).'/..'); $ENV{LD_LIBRARY_PATH} = $path.'/src/.libs'; $ENV{LIBGUESTFS_PATH} = $path.'/appliance'; -$ENV{PERL5LIB} = $path.'/perl/blib/lib:'.$path.'/perl/blib/arch'; -exec('perl', $path.'/cat/virt-cat.pl', @ARGV); +#print (join " ", ("$path/$tool/virt-$tool", @ARGV), "\n"); +exec('perl', "$path/$tool/virt-$tool", @ARGV);