Simplify dir listing code
This commit is contained in:
parent
801e66c4ee
commit
9ebc2b44de
@ -114,10 +114,10 @@ fn txt_handler {
|
||||
}
|
||||
|
||||
fn dir_listing_handler {
|
||||
body = $1
|
||||
echo '<h1 style="text-transform: capitalize;">' `{basename -d $body|sed -e 's,.*//,,g' -e 's,/$,,' -e 's,/, / ,g' } '</h1>'
|
||||
d = `{basename -d $1}
|
||||
echo '<h1 style="text-transform: capitalize;">' `{echo $d|sed -e 's,.*//,,g' -e 's,/$,,' -e 's,/, / ,g' } '</h1>'
|
||||
echo '<ul style="text-transform: capitalize;">'
|
||||
ls -F `{ basename -d $body } | sed -e $dirfilter' s,^'$sitedir'/.*/([^$].*),<li><a href="\1">\1</a></li>,'
|
||||
ls -F $d | sed -e $dirfilter' s,^'$sitedir'/.*/([^$].*),<li><a href="\1">\1</a></li>,'
|
||||
echo '</ul>'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user