diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-04-21 15:09:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-04-21 15:09:17 +0000 |
commit | 918c8de379d2bae26b1d3e9cf870a5ffa564c4b5 (patch) | |
tree | 413c76fb882b08f820d7bffc121ccae5da04e526 /tools/get-needed-drakx-modules | |
parent | e4b3dfd157601c60306c3c4e185adb5469ff8e74 (diff) | |
download | drakx-backup-do-not-use-918c8de379d2bae26b1d3e9cf870a5ffa564c4b5.tar drakx-backup-do-not-use-918c8de379d2bae26b1d3e9cf870a5ffa564c4b5.tar.gz drakx-backup-do-not-use-918c8de379d2bae26b1d3e9cf870a5ffa564c4b5.tar.bz2 drakx-backup-do-not-use-918c8de379d2bae26b1d3e9cf870a5ffa564c4b5.tar.xz drakx-backup-do-not-use-918c8de379d2bae26b1d3e9cf870a5ffa564c4b5.zip |
add some scripts used in perl-install/Makefile and rescue/make_rescue_img
Diffstat (limited to 'tools/get-needed-drakx-modules')
-rwxr-xr-x | tools/get-needed-drakx-modules | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/get-needed-drakx-modules b/tools/get-needed-drakx-modules new file mode 100755 index 000000000..019820c04 --- /dev/null +++ b/tools/get-needed-drakx-modules @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use MDK::Common; + +my ($rel, $dest, $script) = @ARGV; + +$rel =~ s!/?$!!; + +foreach (`strace -efile perl -cw -I $rel $script 2>&1`) { + my ($f) = /^open\("(.*?)",.*\)\s*=\s*\d+$/ or next; + $f !~ m!/usr/lib/perl5/[^/]*/warnings.pm! or next; + if (begins_with($f, $rel)) { + print $f, "\t", $dest . substr($f, length($rel)), "\n"; + } elsif (begins_with($f, '/dev/')) { + # skip + } elsif (begins_with($f, '/')) { + print "$f\n"; + } +} |