git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
win-reg: Add Windows Tips to documentation.
[libguestfs.git]
/
cat
/
run-cat-locally
diff --git
a/cat/run-cat-locally
b/cat/run-cat-locally
index
bba2c08
..
9467ad6
100755
(executable)
--- a/
cat/run-cat-locally
+++ b/
cat/run-cat-locally
@@
-1,5
+1,4
@@
#!/usr/bin/perl
#!/usr/bin/perl
-# virt-cat
# Copyright (C) 2009 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# 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.
# 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 ...]
#
# Use it like this:
# ./run-cat-locally [usual virt-cat args ...]
@@
-31,10
+31,11
@@
use File::Spec;
use Cwd qw(abs_path);
my $path = $0;
use Cwd qw(abs_path);
my $path = $0;
+my $tool = "cat";
# Follow symlinks until we get to the real file
while(-l $path) {
# Follow symlinks until we get to the real file
while(-l $path) {
- my $link = readlink($path);
+ my $link = readlink($path)
or die "readlink: $path: $!"
;
if(File::Spec->file_name_is_absolute($link)) {
$path = $link;
} else {
if(File::Spec->file_name_is_absolute($link)) {
$path = $link;
} else {
@@
-47,6
+48,6
@@
$path = abs_path(dirname($path).'/..');
$ENV{LD_LIBRARY_PATH} = $path.'/src/.libs';
$ENV{LIBGUESTFS_PATH} = $path.'/appliance';
$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("$path/$tool/virt-$tool", @ARGV);