diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-01-05 22:38:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-01-05 22:38:55 +0000 |
commit | b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7 (patch) | |
tree | 3a74332e4115ae3e190ede7e78d84421ba3951e4 /sbin | |
parent | 0f3de907f8726a18c3c2984a2b8b93958958fb03 (diff) | |
download | common-data-b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7.tar common-data-b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7.tar.gz common-data-b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7.tar.bz2 common-data-b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7.tar.xz common-data-b2bd459c94eae41860a33f3a69a4f4d50b6fa1c7.zip |
no_comment
Diffstat (limited to 'sbin')
-rwxr-xr-x | sbin/kdeDesktopCleanup | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/kdeDesktopCleanup b/sbin/kdeDesktopCleanup index 866c5ec..f00e44b 100755 --- a/sbin/kdeDesktopCleanup +++ b/sbin/kdeDesktopCleanup @@ -5,7 +5,7 @@ @dirs = (qw(/etc/skel /root), glob("/home/*")); @path = split ":", "/sbin:/usr/sbin:/usr/X11R6/bin:/bin:/usr/bin"; -foreach $f (map { glob("$_/Desktop/*.kdelnk") } @dirs) { +foreach $f (map { grep { /\.kdelnk$/ } all("$_/Desktop") } @dirs) { open F, $f or next; L: foreach (<F>) { $_ = "Exec=linuxconf" if $f =~ /linuxconf/i; # hack @@ -17,3 +17,13 @@ foreach $f (map { glob("$_/Desktop/*.kdelnk") } @dirs) { last; } } + +sub all { + my $d = shift; + local *F; + opendir F, $d or die "all: can't open dir $d: $!\n"; + my @l = grep { $_ ne '.' && $_ ne '..' } readdir F; + closedir F; + + map { "$d/$_" } @l; +} |