From c70a61b52ba1a5ecd5daff0ebcc17b3eec820c2f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 9 May 2000 17:54:32 +0000 Subject: *** empty log message *** --- sbin/kdeDesktopCleanup | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sbin/kdeDesktopCleanup') diff --git a/sbin/kdeDesktopCleanup b/sbin/kdeDesktopCleanup index e92ea2c..1ff6ea0 100755 --- a/sbin/kdeDesktopCleanup +++ b/sbin/kdeDesktopCleanup @@ -8,14 +8,15 @@ foreach $f (map { grep { /\.kdelnk$/ } eval { all("$_/Desktop") } } @dirs) { open F, $f or next; L: foreach () { - $_ = "Exec=linuxconf" if $f =~ /linuxconf/i; # hack - - ($l) = /^Exec=(?:kdesu\s+-c\s+)?"?(\S+)/ or next; - -x "$_/$l" and last L foreach '', @path; + if (/^Exec=(?:kdesu\s+-c\s+)?"?(\S+)/) { + -x "$_/$1" and last L foreach '', @path; + } elsif (m|^URL=file:(/.*)|) { + -e $1 and last; + } else { next } print STDERR "removing $f\n"; unlink $f; last; - } + } } sub all { -- cgit v1.2.1