Ancestors

Toot

Written by wyatt on 2025-01-25 at 19:57

shell script for generating a directory index.html file

https://megatokyo.moe/generate_dir_index.sh

=> More informations about this toot | More toots from wyatt@soc.megatokyo.moe

Descendants

Written by mirabilos on 2025-01-25 at 20:00

@wyatt aieee!

procline="$(echo "$line" | sed 's!^./!!')"

That can be done in sh. Remind me after next Tyrsday to look it over.

Meanwhile https://github.com/danvk/dygraphs/blob/master/scripts/mkdiridx.sh which gives you proper XHTML.

=> More informations about this toot | More toots from mirabilos@toot.mirbsd.org

Written by wyatt on 2025-01-25 at 20:02

@mirabilos haha i know my script is garbage

it's one of many scripts i wrote in a hurry using a subset of all i know because i didn't want to have to verify posix-ness.

i have many weird idioms in my scripts. would be happy to have you look it over although i might not incorporate the changes

The null separator junk in there is 100% for sure brittle as well.

=> More informations about this toot | More toots from wyatt@soc.megatokyo.moe

Written by mirabilos on 2025-01-25 at 20:18

@wyatt what I meant is: procline=${line#./} saves you a fork+exec and at least one, if not two, more forks

=> More informations about this toot | More toots from mirabilos@toot.mirbsd.org

Written by mirabilos on 2025-01-25 at 20:19

@wyatt also, echo is unsafe if an argument may contain a backslash (or begin with a dash)

=> More informations about this toot | More toots from mirabilos@toot.mirbsd.org

Written by mirabilos on 2025-01-25 at 20:20

@wyatt bbl, transport

=> More informations about this toot | More toots from mirabilos@toot.mirbsd.org

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113890756880305809
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
275.827488 milliseconds
Gemini-to-HTML Time
1.320899 milliseconds

This content has been proxied by September (3851b).