X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=cat%2Frun-cat-locally;h=9467ad6afd5e5d0f592ac090a5693e7d568f0421;hp=7c31aaf9dbbeb1e7dad1d74a0ada659892dd4db6;hb=dc8e4b057ecd3984d7c27c8e;hpb=5d01670e31ef3259fb1fc84a83ab27aec8fdac0b diff --git a/cat/run-cat-locally b/cat/run-cat-locally index 7c31aaf..9467ad6 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', @ARGV); +#print (join " ", ("$path/$tool/virt-$tool", @ARGV), "\n"); +exec("$path/$tool/virt-$tool", @ARGV);