commit f9983ad02bdc06a20d05e3ea474d832ff8cf1305 parent 144ce59d696ec3c16ab1b53916871bb673a2baf4 Author: aabacchus <ben@bvnf.space> Date: Tue, 8 Nov 2022 16:56:59 +0000 gen-index.sh: more robust loop Diffstat:
M | blog/gen-index.sh | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/blog/gen-index.sh b/blog/gen-index.sh @@ -26,7 +26,7 @@ cat << EOF <table> EOF -for f in $(ls -r *.txt *.gmi) ; do +ls -r -- *.txt *.gmi | while read -r f; do unset date title desc link in case "$f" in *.txt) @@ -41,6 +41,7 @@ for f in $(ls -r *.txt *.gmi) ; do title="$(sed 1q "$f")" date="$(sed 1d "$f")" ;; + *) continue ;; esac