diff options
Diffstat (limited to 'relative_me_babe')
-rwxr-xr-x | relative_me_babe | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/relative_me_babe b/relative_me_babe index e390a18..e55b9df 100755 --- a/relative_me_babe +++ b/relative_me_babe @@ -9,10 +9,9 @@ my $r=$ENV{RPM_BUILD_ROOT}; chdir($r) or "Can't cd to $ENV{RPM_BUILD_ROOT}: $!"; push my @files, split(/\n/, `find -type l 2> /dev/null`); -for (@files) { - my $file = $_; - my $link=readlink($file); - if ($link =~ /^\//) { +foreach my $file (@files) { + my $link = readlink($file); + if ($link =~ m!^/!) { $link =~ s|^/||; # Ugly ? no simply chmou. (my $dirname = $file) =~ s|/[^/]*$||; $dirname =~ s|/[^/]+|../|g; $dirname =~ s|^\.||; |