inspect: Add support for Linux Mint and Mandriva.
[libguestfs.git] / cat / run-cat-locally
index 7c31aaf..7945463 100755 (executable)
@@ -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
 # 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('perl', "$path/$tool/virt-$tool", @ARGV);