diff options
author | Chmouel Boudjnah <chmouel@mandriva.org> | 1999-12-19 18:02:29 +0000 |
---|---|---|
committer | Chmouel Boudjnah <chmouel@mandriva.org> | 1999-12-19 18:02:29 +0000 |
commit | 27a46978e80995b757cdba0d068efb0a1cbfa39f (patch) | |
tree | 7a5812ba7e77779fd237e386c00532b0bbce931c /sbin/kdeDesktopCleanup | |
parent | 316a5ee8ecd0f7585bcf13ed642b14b3e2f9875f (diff) | |
download | common-data-topic/mandrake.tar common-data-topic/mandrake.tar.gz common-data-topic/mandrake.tar.bz2 common-data-topic/mandrake.tar.xz common-data-topic/mandrake.zip |
Initial revisionoxygentopic/mandrake
Diffstat (limited to 'sbin/kdeDesktopCleanup')
-rwxr-xr-x | sbin/kdeDesktopCleanup | 17 |
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; + } +} |