diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-04-11 11:48:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-04-11 11:48:29 +0000 |
commit | 15fc94b58a854afb7fc410f47aa6841ea4566b18 (patch) | |
tree | 59ff90201793e7e43e6faf616dee223183a88e25 | |
parent | 2907565e51fac669886f6265c5c4df6f6a3794e5 (diff) | |
download | drakx-15fc94b58a854afb7fc410f47aa6841ea4566b18.tar drakx-15fc94b58a854afb7fc410f47aa6841ea4566b18.tar.gz drakx-15fc94b58a854afb7fc410f47aa6841ea4566b18.tar.bz2 drakx-15fc94b58a854afb7fc410f47aa6841ea4566b18.tar.xz drakx-15fc94b58a854afb7fc410f47aa6841ea4566b18.zip |
(check_prog): make it work
-rw-r--r-- | perl-install/install_any.pm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index a7e7fd43f..793f7dfe6 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -891,24 +891,27 @@ my @bigseldom_used_groups = ( ); sub check_prog { - my ($f, $prefix) = @_; + my ($f) = @_; my @l = $f !~ m|^/| ? map { "$_/$f" } split(":", $ENV{PATH}) : $f; - return if grep { -x "$prefix$_" } @l; + return if grep { -x $_ } @l; - #remove_bigseldom_used(); + my ($f_) = map { m|^/| ? $_ : "/usr/bin/$_" } $f; + remove_bigseldom_used(); foreach (@bigseldom_used_groups) { - my ($f_, @l) = map { m|^/| ? $_ : "/usr/bin/$_" } $f, @$_; + my (@l) = map { m|^/| ? $_ : "/usr/bin/$_" } @$_; if (member($f_, @l)) { foreach (@l) { - getAndSaveFile("Mandrake/mdkinst$_", "$prefix$_"); - chmod 0755, "$prefix$_"; + getAndSaveFile($_); + chmod 0755, $_; } - last; + return; } } + getAndSaveFile($f_); + chmod 0755, $f_; } sub remove_bigseldom_used { |