Last change
on this file since 3229 was 3228, checked in by Bruno Cornec, 10 years ago |
- Add a test file for MondoRescue::File for the mr_read_all_link function which is a critical one
- Function now work as expected including normalization
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | #!/usr/bin/perl -w
|
---|
2 | #
|
---|
3 | # $Id$
|
---|
4 | # Copyright B. Cornec 2005-2014
|
---|
5 | # Provided under the GPL v2
|
---|
6 | #
|
---|
7 | # Get all links from a file
|
---|
8 | #
|
---|
9 | use strict;
|
---|
10 | use Data::Dumper;
|
---|
11 | use MondoRescue::File;
|
---|
12 |
|
---|
13 | =pod
|
---|
14 |
|
---|
15 | =head1 NAME
|
---|
16 |
|
---|
17 | mr-read-all-link keeps track of all the links of a file and display them
|
---|
18 |
|
---|
19 | =head1 DESCRIPTION
|
---|
20 |
|
---|
21 | mr-read-all-link keeps track of all the links of a file and display them, by analyzing the path under which the file is located and mentioning all links that are encountered so that all the required content for a chroot environment are given back correctly.
|
---|
22 |
|
---|
23 | =head1 SYNOPSIS
|
---|
24 |
|
---|
25 | mr-read-all-link /path/to/file ...
|
---|
26 |
|
---|
27 | =head1 ARGUMENTS
|
---|
28 |
|
---|
29 | =over 4
|
---|
30 |
|
---|
31 | =item B</path/to/file>
|
---|
32 |
|
---|
33 | This is the path of the binary file and for which we want its links to be included
|
---|
34 |
|
---|
35 | =back
|
---|
36 |
|
---|
37 | =head1 WEB SITES
|
---|
38 |
|
---|
39 | The main Web site of the project is available at L<http://www.mondorescue.org>. Bug reports should be filled using the trac instance of the project at L<http://trac.mondorescue.org/>.
|
---|
40 |
|
---|
41 | =head1 USER MAILING LIST
|
---|
42 |
|
---|
43 | For community exchanges around MondoRescue please use the list L<http://sourceforge.net/mailarchive/forum.php?forum_name=mondo-devel>
|
---|
44 |
|
---|
45 | =head1 AUTHORS
|
---|
46 |
|
---|
47 | The MondoRescue team lead by Bruno Cornec L<mailto:bruno@mondorescue.org>.
|
---|
48 |
|
---|
49 | =head1 COPYRIGHT
|
---|
50 |
|
---|
51 | MondoRescue is distributed under the GPL v2.0 license or later,
|
---|
52 | described in the file C<COPYING> included with the distribution.
|
---|
53 |
|
---|
54 | =cut
|
---|
55 |
|
---|
56 |
|
---|
57 | my $file = mr_file_read_all_link(@ARGV) if (defined $ARGV[0]);
|
---|
58 |
|
---|
59 | #print Dumper($file);
|
---|
60 |
|
---|
61 | foreach my $f (sort keys %$file) {
|
---|
62 | print "$f\n";
|
---|
63 | print "--\n";
|
---|
64 | #print Dumper($f);
|
---|
65 | foreach my $l (@{$file->{$f}}) {
|
---|
66 | print "$l\n";
|
---|
67 | }
|
---|
68 | print "--\n";
|
---|
69 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.