start tidy makefile
[hband-tools.git] / icewm / icewm-menuhelper-parent-dirs
blob6cbcedff7658218161c429becc7d128d11ad50f0
1 #!/usr/bin/env perl
3 while(<STDIN>)
5 ($type, $path) = /(\S+)\t(.+)\n/;
6 $path =~ s/\/$//;
8 if($type ne "inode/directory")
10 $path =~ s/([^\/]+)$//;
13 $path =~ s/^(.+)\/$/$1/;
15 if(!$dirs{$path})
17 print "inode/directory\t$path\n";
18 $dirs{$path}=1;