aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/kdeDesktopCleanup
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>1999-12-19 18:02:29 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>1999-12-19 18:02:29 +0000
commit27a46978e80995b757cdba0d068efb0a1cbfa39f (patch)
tree7a5812ba7e77779fd237e386c00532b0bbce931c /sbin/kdeDesktopCleanup
parent316a5ee8ecd0f7585bcf13ed642b14b3e2f9875f (diff)
downloadcommon-data-27a46978e80995b757cdba0d068efb0a1cbfa39f.tar
common-data-27a46978e80995b757cdba0d068efb0a1cbfa39f.tar.gz
common-data-27a46978e80995b757cdba0d068efb0a1cbfa39f.tar.bz2
common-data-27a46978e80995b757cdba0d068efb0a1cbfa39f.tar.xz
common-data-27a46978e80995b757cdba0d068efb0a1cbfa39f.zip
Initial revisionoxygentopic/mandrake
Diffstat (limited to 'sbin/kdeDesktopCleanup')
-rwxr-xr-xsbin/kdeDesktopCleanup17
1 files changed, 17 insertions, 0 deletions
diff --git a/sbin/kdeDesktopCleanup b/sbin/kdeDesktopCleanup
new file mode 100755
index 0000000..0f6051b
--- /dev/null
+++ b/sbin/kdeDesktopCleanup
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+@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) {
+ open F, $f or next;
+ L: foreach (<F>) {
+ $_ = "Exec=linuxconf" if $f =~ /linuxconf/i; # hack
+
+ ($l) = /^Exec=(?:kdesu\s+-c\s+)?"?(\S+)/ or next;
+ -x "$_/$l" and last L foreach '', @path;
+ print STDERR "removing $f\n";
+ unlink $f;
+ last;
+ }
+}