repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
start tidy makefile
[hband-tools.git]
/
icewm
/
icewm-menuhelper-parent-dirs
blob
6cbcedff7658218161c429becc7d128d11ad50f0
1
#!/usr/bin/env perl
2
3
while
(<
STDIN
>)
4
{
5
(
$type
,
$path
) =
/(\S+)\t(.+)\n/
;
6
$path
=~
s/\/$/
/;
7
8
if
(
$type
ne
"inode/directory"
)
9
{
10
$path
=~
s/([^\/]+)$/
/;
11
}
12
13
$path
=~
s/^(.+)\/$/
$1
/;
14
15
if
(!
$dirs
{
$path
})
16
{
17
print
"inode/directory
\t
$path
\n
"
;
18
$dirs
{
$path
}=
1
;
19
}
20
}